php-doc-en/reference/pdf/book.xml
2011-07-15 15:46:15 +00:00

116 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- Membership: pecl, external -->
<book xml:id="book.pdf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PDF</title>
<!-- {{{ preface -->
<preface xml:id="intro.pdf">
&reftitle.intro;
<para>
The PDF functions in PHP can create PDF files using the PDFlib
library which was initially created by Thomas Merz and is now
maintained by <link xlink:href="&url.pdf;">PDFlib GmbH</link>.
</para>
<para>
The documentation in this section is only meant to be an overview
of the available functions in the PDFlib library and should not be
considered an exhaustive reference. For the full and detailed
explanation of each function, consult the PDFlib Reference Manual
which is included in all PDFlib packages distributed by PDFlib GmbH.
It provides a very good overview of what PDFlib is capable of doing
and contains the most up-to-date documentation of all functions.
</para>
<para>
For a jump start we urge you to take a look at the programming samples
which are contained in all PDFlib distribution packages. These samples
demonstrate basic text, vector, and graphics output as well as
higher-level functions, such as the PDF import facility (PDI).
</para>
<para>
All of the functions in PDFlib and the PHP module have identical
function names and parameters. Unless configured otherwise, 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. Please see the PDFlib Reference Manual
included in the PDFlib distribution for a more thorough explanation
of the coordinate system used.
</para>
<para>
With version 6, PDFlib offers an object-oriented API for PHP 5 in
addition to the function-oriented API for PHP 4. The main difference is
the following:
</para>
<para>
In PHP 4, first a PDF resource has to be retrieved with a function call
like
</para>
<para>
$p = PDF_new().
</para>
<para>
This PDF resource is used as the first parameter in all further function
calls, such as in
</para>
<para>
PDF_begin_document($p, "", "").
</para>
<para>
In PHP 5 however, a PDFlib object is created with
</para>
<para>
$p = new PDFlib().
</para>
<para>
This object offers all PDFlib API functions as methods, e.g. as with
</para>
<para>
$p->begin_document("", "").
</para>
<para>
In addition, exceptions have been introduced in PHP 5 which are
supported by PDFlib 6 and later as well.
</para>
<para>
Please see the <link linkend="pdf.examples">examples</link> below for
more information.
</para>
<note>
<para>
If you're interested in alternative free PDF generators that do not
utilize external PDF libraries, see <link linkend="faq.using.freepdf">
this related FAQ</link>.
</para>
</note>
</preface>
<!-- }}} -->
&reference.pdf.setup;
&reference.pdf.constants;
&reference.pdf.examples;
&reference.pdf.reference;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->