PHP : Function Reference : PDF Functions : PDF_get_pdi_value
gregors
If you are having troubles getting the page count make sure you have Root caplitalized correctly.
$numPages=pdf_get_pdi_value($p,"/Root/Pages/Count",$input,0,0);
ian dot kinnear
From the pdflib manual...
key: Specifies the name of the parameter
doc: a valid PDF document handle retrieved with PDF_open_pdi()
page: A valid PDF page handle (not page number!). For keys which are not page-related page must be -1
Example:
$numPages=pdf_get_pdi_value($p,"/root/Pages/Count",$input,0,0);
09-may-2003 10:16
For keys which are not page-related page must be -1 (in PHP: 0).
|