Introduction
You can use the PDF functions in PHP to create PDF files if you
- have the PDF library by Thomas Merz (available at
+ have the PDF library by Thomas Merz (available at
&url.pdf;;
you will also need the JPEG library
and the TIFF library to
- compile this. These two libs also quite often make problems when
- configuring php. Follow the messages of configure to fix possible
- problems.
+ compile this. These two librariess can often cause problems when
+ configuring PHP, so be sure to pay attention to the output of
+ the configure script and fix any problems it reports.
- Please consult the excellent documentation for
- PDFlib shipped with the source distribution of PDFlib.
- It provides a very good overview of what PDFlib capable of doing
- and contains the full and uptodate description of all functions.
+ Please consult the documentation for PDFlib shipped with
+ the source distribution of PDFlib. It provides a very good
+ overview of what PDFlib is capable of doing and contains the full
+ and most up-to-date description of all functions.
All of the functions in PDFlib and the PHP module have the same name.
The parameters are also identical.
You should also understand some of the concepts of PDF
- or Postscript to efficiently use this module.
- All lengths and coordinates are measured in Postscript points.
+ or PostScript to efficiently use this module.
+ All lengths and coordinates are measured in PostScript points.
There are generally 72 PostScript points to an inch, but this
depends on the output resolution.
- There is another PHP module for pdf document creation based on
+ There is another PHP module for PDF document creation based on
FastIO's.
ClibPDF. It has a slightly different API. Check the
ClibPDF functions section for
details.
- The pdf module introduces one new type of variable.
- It is called pdf object and
- almost all functions need pdf object
+ The PDF module introduces one new type of variable.
+ It is called a pdf object and
+ almost all functions need a pdf object
as its first parameter.
Confusion with old PDFlib versions
- Starting with php V4.0.5 the PHP extension for PDFlib is officially
- supported by PDFlib GmbH. This means, that all the functions
+ Starting with PHP 4.0.5, the PHP extension for PDFlib is officially
+ supported by PDFlib GmbH. This means that all the functions
described in the PDFlib-manual (V3.00 or greater) are supported by
- php4 with exactly the same meaning and the same parameters.
- Only the returnvalues may differ from the PDFlib manual, as we
- adoptet the PHP way to return FALSE in case of errors.
+ PHP 4 with exactly the same meaning and the same parameters.
+ Only the return values may differ from the PDFlib manual, because
+ the PHP convention of returning false was adopted.
For compatibility reasons this binding for
- PDFlib still will support the old functions, but as stated above
+ PDFlib still supports the old functions, but as stated above
they should be replaced by their new versions. PDFlib GmbH will not
- support any problems arraising from the use of these depreciated
+ support any problems arising from the use of these deprecated
functions.
@@ -228,22 +228,20 @@
Issues with older versions of PDFlib
- Any version of PHP 4 after March, 9th 2000 do not support versions
+ Any version of PHP 4 after March 9, 2000 does not support versions
of PDFlib older than 3.0.
- PHP 3 on the other hand should not be used with version newer
- than 2.01. Since revision 1.61 of php3/functions/pdf.c (php 3.19)
- it is save to use PDFlib 3.0 or greater.
+ PDFlib 3.0 or greater is also supported by PHP 3.0.19 and later.
Examples
Most of the functions are fairly easy to use. The most difficult part
- is probably to create a very simple pdf document at all. The following
+ is probably creating a very simple PDF document at all. The following
example should help to get started.
- It creates the file test.pdf
+ It creates test.pdf
with one page. The page contains the text "Times Roman outlined" in an
outlined, 30pt font. The text is also underlined.
@@ -415,7 +413,7 @@
PDF_add_annotation
- Deprecitad: Adds annotation
+ Deprecated: Adds annotationDescription
@@ -539,7 +537,7 @@
Description
- Depreciated.
+ Deprecated.
See PDF_add_bookmark.
@@ -1053,7 +1051,7 @@
PDF_endpath
- Depreciated: Ends current path
+ Deprecated: Ends current pathDescription
@@ -1188,12 +1186,12 @@
PDF_get_font
- Depreciated font handling
+ Deprecated font handlingDescription
- Depreciated.
+ Deprecated.
See PDF_get_value.
@@ -1204,12 +1202,12 @@
PDF_get_fontname
- Depreciated font handling
+ Deprecated font handlingDescription
- Depreciated.
+ Deprecated.
See PDF_get_parameter.
@@ -1220,12 +1218,12 @@
PDF_get_fontsize
- Depreciated font handling
+ Deprecated font handlingDescription
- Depreciated.
+ Deprecated.
See PDF_get_value.
@@ -1248,7 +1246,7 @@
- The PDF_get_image_height is depreciated,
+ The PDF_get_image_height is deprecated,
use PDF_get_value instead.
@@ -1269,7 +1267,7 @@
- The PDF_get_image_width is depreciated,
+ The PDF_get_image_width is deprecated,
use PDF_get_value instead.
@@ -1473,7 +1471,7 @@
Description
- The PDF_open is depreciated, use
+ The PDF_open is deprecated, use
PDF_new plus PDF_open_file
instead.
@@ -1566,12 +1564,12 @@
PDF_open_gif
- Depreciated: Opens a GIF image
+ Deprecated: Opens a GIF imageDescription
- Depreciated.
+ Deprecated.
See PDF_open_image,
@@ -1640,12 +1638,12 @@
PDF_open_jpeg
- Depreciated: Opens a JPEG image
+ Deprecated: Opens a JPEG imageDescription
- Depreciated.
+ Deprecated.
See also PDF_open_image,
@@ -1705,13 +1703,13 @@
PDF_open_png
- Depreciated: Opens a PNG image
+ Deprecated: Opens a PNG image
Description
- Depreciated.
+ Deprecated.
See PDF_open_image.
@@ -1722,7 +1720,7 @@
PDF_open_tiff
- Depreciated: Opens a TIFF image
+ Deprecated: Opens a TIFF imageDescription
@@ -1734,7 +1732,7 @@
- Depreciated.
+ Deprecated.
See also PDF_open_image,
@@ -2002,7 +2000,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2027,7 +2025,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2052,7 +2050,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2204,7 +2202,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2231,7 +2229,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2258,7 +2256,7 @@
- PDFlib V4.0: Depreciated, use PDF_setcolor instead.
+ PDFlib V4.0: Deprecated, use PDF_setcolor instead.
@@ -2333,12 +2331,12 @@
PDF_set_char_spacing
- Depreciated: Sets character spacing
+ Deprecated: Sets character spacingDescription
- Depreciated.
+ Deprecated.
See also PDF_set_value,
@@ -2354,7 +2352,7 @@
Description
- Depreciated.
+ Deprecated.
See PDF_set_value.
@@ -2365,12 +2363,12 @@
PDF_set_font
- Depreciated: Selects a font face and size
+ Deprecated: Selects a font face and sizeDescription
- Depreciated. You should use PDF_findfont plus
+ Deprecated. You should use PDF_findfont plus
PDF_setfont instead.
@@ -2395,7 +2393,7 @@
- Depreciated.
+ Deprecated.
See also PDF_set_value,
@@ -2429,12 +2427,12 @@
PDF_set_leading
- Depreciated: Sets distance between text lines
+ Deprecated: Sets distance between text linesDescription
- Depreciated.
+ Deprecated.
See also PDF_set_value,
@@ -2487,12 +2485,12 @@
PDF_set_text_rendering
- Depreciated: Determines how text is rendered
+ Deprecated: Determines how text is renderedDescription
- Depreciated.
+ Deprecated.
See PDF_set_value,
@@ -2508,7 +2506,7 @@
Description
- Depreciated.
+ Deprecated.
See PDF_set_value,
@@ -2558,7 +2556,7 @@
Description
- Depreciated.
+ Deprecated.
See also PDF_set_value,