PDFLib pdf_get_pdi_value

From: Date: Tue, 18 May 2004 20:15:17 +0000
Subject: PDFLib pdf_get_pdi_value
Groups: php.general 
Request: Send a blank email to php-general+get-186499@lists.php.net to get a copy of this message
I am trying to do some PDF templating work with PHP/PDFLib. I have a template file created and I am able to use all of the php functions for pdf's but I am having a slight problem: here is part of my code $pdi_file = $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']).'/block_test.pdf'; $pdf = PDF_new(); pdf_open_file($pdf); $src_doc = pdf_open_pdi($pdf,$pdi_file,'', 0); $src_page = pdf_open_pdi_page($pdf,$src_doc,1,''); $src_width = pdf_get_pdi_value($pdf,'width' ,$src_doc,$src_page,0); $src_height = pdf_get_pdi_value($pdf,'height',$src_doc,$src_page,0); everything works great until I get to here: $src_width = pdf_get_pdi_value($pdf,'width' ,$src_doc,$src_page,0); I get a fatal php error: Fatal error: PDFlib error [1118] PDF_get_pdi_value: Handle parameter 'page' has bad value 0 in /var/www/html/active/www.midstatedistributing.com/html/developers/test.php on line 11 From the user comments on php.net, it says the forth paremeter of pdf_get_pdi_value needs to be a valid PDF page handle. I cant seem to find a way to get a page handle into a variable. Has anyone had any experience with this? I am having troubles finding stuff on the web. Thanks in advance.

« previous php.general (#186499) next »