php.net |  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 :
$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 */

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] joey@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC