Values for rotation are (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90,
right: +90, down: +180. left, right and down make relative adjustments to a page's rotation.
Note: Older pdftk versions use N, E, S, W, L, R, and D instead.
Example:
$pdf = new Pdf;
$pdf->addFile('file1.pdf', 'A')
->addFile('file2.pdf', 'B')
->cat(array(1,3),'B')) // pages 1 and 3 of file B
->cat(1, 5, 'A', 'odd') // pages 1, 3, 5 of file A
->cat('end', 5, 'B') // pages 5 to end of file B in reverse order
->cat(null, null, 'B', 'east') // All pages from file B rotated by 90 degree
->saveAs('out.pdf');
public cat ( integer | string | array $start, integer | string | null $end = null, string | null $handle = null, string | null $qualifier = null, string $rotation = null ) : |
||
$start | integer | string | array | the start page number or an array of page numbers. If an array, the other arguments will be ignored. $start can also be bigger than $end for pages in reverse order. |
$end | integer | string | null | the end page number or null for single page (or list if $start is an array) |
$handle | string | null | the handle of the file to use. Can be null if only a single file was added. |
$qualifier | string | null | the page number qualifier, either 'even' or 'odd' or null for none |
$rotation | string | the rotation to apply to the pages. |
Результат | the pdf instance for method chaining |