This works the same as cat(), but each call to this method creates a "stream" of pages. The outfile
will be assembled by adding one page from each stream at a time.
Example:
$pdf = new Pdf;
$pdf1 = $pdf->addFile('file1.pdf');
$pdf->cat($pdf1, array(1,3,2))
->cat($pdf1, array(4,5,9)
->saveAs('out.pdf');
This will give the page order 1, 4, 3, 5, 2, 9 in the out.pdf
public shuffle ( integer | array $start, integer | null $end = null, string $handle = null, string | null $qualifier = null, string $rotation = null ) : |
||
$start | integer | array | the start page number or an array of page numbers. |
$end | integer | null | the end page number or null for single page (or list if $start is an array) |
$handle | string | the handle of the input file to use |
$qualifier | string | null | the page number qualifier, either 'even' or 'odd' or null for none |
$rotation | string | the rotation to apply to the pages. See cat() for more details. |
리턴 | the pdf instance for method chaining |