©
本文檔使用 php中文網手册 發布
(PHP 4 >= 4.0.5, PECL pdflib >= 1.0.0)
PDF_get_pdi_value — Get PDI numerical parameter [deprecated]
$p
, string $key
, int $doc
, int $page
, int $reserved
)Gets the contents of a PDI document parameter with numerical type.
This function is deprecated since PDFlib version 7, use PDF_pcos_get_number() instead.
[#1] gregors at rose-hulman dot edu [2003-06-13 14:11:36]
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);
[#2] [2003-05-09 14:16:22]
For keys which are not page-related page must be -1 (in PHP: 0).
[#3] ian dot kinnear at optus-ebiz dot com [2001-07-13 12:56:50]
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);