Name

import->get_pages -- Get information about imported pages.

Synopsis

array import->append ( [ array existing_pages ] )

Description

This function returns an array of pages that were added by the last append operation. If an array of existing_pages is passed, the function will return an array with the new pages appended to the end of existing_pages

Examples

The following will import some existing PDFs and build an array of pages as it goes.

$pdf = new PDFFile;
$pdf->enable('import');
$pdf->import->append('some_existing.pdf'); // Let's pretend this is 1 page
$pages = $pdf->import->get_pages();
$pdf->import->append('another_existing.pdf'); // Pretend this has 2 pages
$pages = $pdf->import->get_pages($pages); // $pages now has 3 values

See Also

History

Added in 2.9

Bugs

None known.