PHP 4.0 Bug #4275: PDF functions will not allow setting "compatibility" to "1.2" with PDFLib 3.0
| From: | ziggyh at hotmail dot com | Date: | Fri, 28 Apr 2000 20:53:37 +0000 |
| Subject: | PHP 4.0 Bug #4275: PDF functions will not allow setting "compatibility" to "1.2" with PDFLib 3.0 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18290@lists.php.net to get a copy of this message | ||
From: ziggyh@hotmail.com
Operating system: RedHat 6.2
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Other
Bug description: PDF functions will not allow setting "compatibility" to "1.2"
with PDFLib 3.0
Apache 1.3.12 with SSL
PHP 4.0 RC 1
Zend Optimizer
PDFLIB 3.0 compiled in using :
'./configure' '--with-mysql' '--with-apache=../apache_1.3.12'
'--with-pdflib=/' '--with-zlib-dir' '--with-jpeg-dir=/usr/lib'
'--with-tiff-dir=/usr/lib' '--with-png-dir=/usr/lib'
'--with-gettext=/usr/bin' '--disable-debug' '--with-imap=../imap-4.7b'
'--with-ttf' '--enable-trans-sid' '--prefix=/usr'
'--exec-prefix=/usr'
Now .. if I try to set "compatibility" to "1.2" using the
pdf_set_parameter function after pdf_open, PdfLib says :
Internal pdflib error: Must change compatiblity level before PDF_open()
.. which obviously doesn't work since the pdf_set_parameter
function needs a pdf handle.
Ok .. trying to use pdf_getinfo first doesn't work :
Call to undefined function: pdf_get_info()
.. obviously since this is pdflib 3.0 (re the php manual)
A bit of code :
$name=tempname("/tmp/","");
$fp=fopen($name,"w");
$pdf=PDF_open($fp);
$info=PDF_get_info($pdf); /* Call to undefined function */
PDF_set_parameter($pdf,"compatibility","1.2"); /* Must change compatibility
level before PDF_open */