php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #33818 wrong parametr number for pdf functions
Submitted: 2005-07-22 12:08 UTC Modified: 2005-07-22 14:10 UTC
From: massimo dot ferrario at inforeti dot it Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: massimo dot ferrario at inforeti dot it
New email:
PHP Version: OS:

 

 [2005-07-22 12:08 UTC] massimo dot ferrario at inforeti dot it
Description:
------------
I'm getting a lot of warning/errors from pdf related functions after upgrading to php 4.4.0. It appears that at least some of the changes reported in the documentation were backported from version 5 to version 4.4.

Compare for instance the following warning:
PHP Warning:  pdf_stringwidth() expects exactly 4 parameters, 2 given in MYFILE on line MYLINE

with what is written in the online docs at
http://www.php.net/manual/en/function.pdf-stringwidth.php

float pdf_stringwidth ( resource pdfdoc, string text, int font, float size )
Returns the width of text using the last font set by pdf_setfont(). If the optional parameters font and size are specified, the width will be calculated using that font and size instead. Please note that font is a font handle returned by pdf_findfont(). Parameters font and size were optional before PHP 5.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-22 14:10 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

It depends also on PDFlib version. With PDFlib version >= 5, no parameters are optional. I documented that.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 12:01:31 2025 UTC