|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29387 pdf_open_file requires 2 arguments where 1 should be permitted
Submitted: 2004-07-26 13:48 UTC Modified: 2004-11-08 12:10 UTC
Avg. Score:4.3 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:3 (42.9%)
From: emile dot axelrad at connect dot co dot uk Assigned: hholzgra (profile)
Status: Not a bug Package: *PDF functions
PHP Version: 5.0.0 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: emile dot axelrad at connect dot co dot uk
New email:
PHP Version: OS:


 [2004-07-26 13:48 UTC] emile dot axelrad at connect dot co dot uk
The PHP manual describes pdf_open_file as working with just one argument (the pdf handle).

This code works fine with PHP 4 but on PHP 5.0.0 does not work. It thinks that the 'filename' argument is required, but it is in fact optional.

Reproduce code:
$pdf = pdf_new();

Expected result:
It should work without an error. Should create a PDF document in memory, not in a file.

Actual result:
Fatal error: Uncaught exception 'PDFlibException' with message 'pdf_open_file() expects exactly 2 parameters, 1 given' in C:\test.php:2 Stack trace: #0 {main} thrown in C:\test.php on line 2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-10 21:27 UTC] jeremydurham at gmail dot com
If you are searching for a resolution for this issue still, you should contact pdflib. This is an issue with the implementation of the functions in the pdf.c file. It can easily be corrected with a few changes but it is likely not the correct way to solve this problem.

 [2004-11-08 12:10 UTC]
You're using the PHP 5 version of the extension and the API has changed. 
 [2013-08-16 09:56 UTC]
Automatic comment from SVN on behalf of daijie
Log: 一些更新 和 新的翻译

Provided by anonymous #29387 (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC