|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4275 PDF functions will not allow setting "compatibility" to "1.2" with PDFLib 3.0
Submitted: 2000-04-28 22:53 UTC Modified: 2000-08-11 02:18 UTC
From: ziggyh at hotmail dot com Assigned: joey (profile)
Status: Closed Package: Other
PHP Version: 4.0 Release Candidate 1 OS: RedHat 6.2
Private report: No CVE-ID: None
 [2000-04-28 22:53 UTC] ziggyh at hotmail dot com
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 :
$info=PDF_get_info($pdf); /* Call to undefined function */
PDF_set_parameter($pdf,"compatibility","1.2"); /* Must change compatibility level before PDF_open */


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 10:32 UTC] joey at cvs dot php dot net
This is because there is not (currently) anyway to obtain a PDF structure
from user-land w/o having one of the open_*()'s called on it.

Until you can get a PDF struct. w/o calling pdf_open_*(), attempting this 
should raise an error. Just commited a patch that (hopefully) does just that.
 [2000-08-11 02:18 UTC]
Can you try latest CVS?
You should now get an error of level E_ERROR
telling you that compatibility mode is unsupported.

If not, please open a new bug.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 19:03:41 2023 UTC