PHP 5.6.0RC3 is available

PDF_get_pdi_value

(PHP 4 >= 4.0.5, PECL pdflib >= 1.0.0)

PDF_get_pdi_valueLit des paramètres numériques dans le document PDF d'entrée (obsolète)

Description

float PDF_get_pdi_value ( resource $p , string $key , int $doc , int $page , int $reserved )

PDF_get_pdi_value() lit des paramètres numériques dans le document PDF d'entrée.

Cette fonction est obsolète depuis PDFlib version 7, utilisez plutôt la fonction PDF_pcos_get_number().

add a note add a note

User Contributed Notes 3 notes

up
0
gregors at rose-hulman dot edu
11 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);
up
0
Anonymous
11 years ago
For keys which are not page-related page must be -1 (in PHP: 0).
up
0
ian dot kinnear at optus-ebiz dot com
13 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);
To Top