PDF_get_pdi_value
(PHP 4 >= 4.0.5, PECL pdflib >= 1.0.0)
PDF_get_pdi_value — Get PDI numerical parameter [deprecated]
说明
PDF_get_pdi_value
( resource
$p
, string $key
, int $doc
, int $page
, int $reserved
) : floatGets the contents of a PDI document parameter with numerical type.
This function is deprecated since PDFlib version 7, use PDF_pcos_get_number() instead.

User Contributed Notes 3 notes
gregors at rose-hulman dot edu ¶
15 years ago
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 at optus-ebiz dot com ¶
17 years ago
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);
备份地址:http://www.lvesu.com/blog/php/function.pdf-get-pdi-value.php