Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on pdf_openfile() problem in the Shared & Semi-Dedicated forum
Hi All, I have 2 sites hosted with Jaguar on 2 different servers - each one has a different version of PDFLib. I have recently ...

  1. #1
    JPC Member
    Join Date
    Apr 2003
    Posts
    16

    pdf_openfile() problem

    Hi All,

    I have 2 sites hosted with Jaguar on 2 different servers - each one has a different version of PDFLib.

    I have recently begun encountering a problem with the PHP function "pdf_open_file()" on the site with the newer version of PDFLib. One would assume the problem stems from the upgrade but that is neither here nor there....

    The error message says "Warning: pdf_open_file() expects exactly 2 parameters, 1 given in..."

    I checked the PHP manual at this page: pdf_open_file()

    Basically it says that although the function accepts 2 parameters, the second one is optional and by omiting the second one the PDF will be generated in memory.

    So, anyone else have this problem and, if so (or not), how do I fix it AND keep the PDFs being generated in memory? I am thinking that I have to add a null for the second parameter - i.e. pdf_open_file($pdf, "") instead of simply pdf_open_file($pdf) as I have been doing.

    Any help is much appreciated!
    Last edited by zandermander; 08-12-2004 at 04:26 PM.

  2. #2
    JPC Member
    Join Date
    Apr 2003
    Posts
    16
    OK, I was able to determine that adding a null value does prevent the error but, again, this is an error which should not be occuring - it is for an optional value.

    Anyone able to offer any advice?

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    http://bugs.php.net/bug.php?id=29387

    My guess is that it is bug in the PDFlib library, and not in PHP, but I could be wrong. Regardless, you aren't the first to experience the problem. If using null mitigates the problem, then I wouldn't worry about ittoo much, at least not right now.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •