note 95236 added to function.pdf-load-image
| From: | Anonymous at osu1 dot php dot net | Date: | Sun, 20 Dec 2009 18:34:26 +0000 |
| Subject: | note 95236 added to function.pdf-load-image | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164158@lists.php.net to get a copy of this message | ||
If you are using PDFLib under Windows and you are wondering why your image file can not be found
(using a relative path), here is your answer!
From the manual (PDFlib 5.0.3, chapter 2.9.1):
"File name handling in PHP. Unqualified file names (without any path
component) and relative file names for PDF, image, font and other disk
files are handled differently in Unix and Windows versions of PHP:
-PHP on Unix systems will find files without any path component in the
directory where the script is located.
- PHP on Windows will find files without any path component only in the
directory where the PHP DLL is located.
In order to provide platform-independent file name handling use of
PDFlibâs Search-Path facility (see Section 3.1.6, »Resource
configuration and File Searching«, page 47) is strongly recommended.
Solution: use Search-Path
$pdf->set_parameter('SearchPath', 'path_to_your_images');
or
PDF_set_parameter('SearchPath', 'path_to_your_images');
----
Server IP: 69.147.83.197
Probable Submitter: 82.168.84.7
----
Manual Page -- http://www.php.net/manual/en/function.pdf-load-image.php
Edit -- https://master.php.net/note/edit/95236
Del: integrated -- https://master.php.net/note/delete/95236/integrated
Del: useless -- https://master.php.net/note/delete/95236/useless
Del: bad code -- https://master.php.net/note/delete/95236/bad+code
Del: spam -- https://master.php.net/note/delete/95236/spam
Del: non-english -- https://master.php.net/note/delete/95236/non-english
Del: in docs -- https://master.php.net/note/delete/95236/in+docs
Del: other reasons-- https://master.php.net/note/delete/95236
Reject -- https://master.php.net/note/reject/95236
Search -- https://master.php.net/manage/user-notes.php