rjs Thu Feb 8 03:41:27 2001 EDT Modified files: /phpdoc/en/functions pdf.xml Log: Bringing the recent changes to the pdfbinding to the documentation - documented the new functions - marked unsupported functions as Depreciated - all descriptions are from the offical shortdescription of PDFlib. For full documentation the PDFlib manual is recomended, as all changes will be keept up to date there, it also include lots of additional information not available here. But the short descriptions will help as simple reference, and changes to the short descriptions are rarely neccesary
Index: phpdoc/en/functions/pdf.xml diff -u phpdoc/en/functions/pdf.xml:1.33 phpdoc/en/functions/pdf.xml:1.34 --- phpdoc/en/functions/pdf.xml:1.33 Wed Dec 13 11:29:55 2000 +++ phpdoc/en/functions/pdf.xml Thu Feb 8 03:41:27 2001 @@ -1,2573 +1,2348 @@ - <reference id="ref.pdf"> - <title>PDF functions</title> - <titleabbrev>PDF</titleabbrev> - - <partintro> - <sect1 id="pdf.intro"> - <title>Introduction</title> - <simpara> - You can use the PDF functions in PHP to create PDF files if you - have the PDF library by Thomas Merz (available at - <ulink url="&url.pdf;">&url.pdf;</ulink>; - you will also need <ulink url="&url.jpeg;">the JPEG library</ulink> - and <ulink url="&url.tiff;">the TIFF library</ulink> to - compile this. These two libs also quite often make problems when - configuring php. Follow the messages of configure to fix possible - problems. - </simpara> - <simpara> - 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. - Most 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. - There are generally 72 PostScript points to an inch, but this - depends on the output resolution. - </simpara> - <simpara> - There is another PHP module for pdf document creation based on - <ulink url="&url.cpdf;">FastIO's</ulink>. - ClibPDF. It has a slightly different API. Check the - <link linkend="ref.cpdf">ClibPDF functions</link> section for - details. - </simpara> - <simpara> - The pdf module introduces two new type of variable. - It is called <parameter>pdfdoc</parameter> - <parameter>pdfdoc</parameter> is a pointer to a pdf document and - almost all functions need it as its first parameter. - </simpara> - </sect1> - <sect1 id="pdf.oldlibs.confusion"> - <title>Confusion with old pdflib versions</title> - <simpara> - Since the very begining of PDF support in PHP — starting with - pdflib 0.6 — - there has been tons of changes especially to the pdflib API. Most of - these changes has been somehow covered by PHP, some has even required - changes to the PHP API. Since pdflib - 3.x the API seems to be stabilzed and PHP 4 has adopted the version as a - minimum requirement for PDF support. The consequence will be that many - functions will disappear or be replaced by alternatives sooner or later. - Support for pdflib 0.6 is already completely given up. - The following table list all the functions which are deprecated - in PHP 4.02 and should be replaced by their new versions. - </simpara> - <para> - <table> - <title>Deprecated functions and its replacements</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Old function</entry> - <entry>Replacement</entry> - </row> - </thead> - <tbody> - <row> - <entry><function>pdf_put_image</function></entry> - <entry>Not needed anymore.</entry> - </row> - <row> - <entry><function>pdf_get_font</function></entry> - <entry><function>pdf_get_value</function> passing - <literal>"font"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_get_fontsize</function></entry> - <entry><function>pdf_get_value</function> passing - <literal>"fontsize"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_get_fontname</function></entry> - <entry><function>pdf_get_parameter</function> passing - <literal>"fontname"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_info_creator</function></entry> - <entry><function>pdf_set_info</function> passing - <literal>"Creator"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_info_title</function></entry> - <entry><function>pdf_set_info</function> passing - <literal>"Title"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_info_subject</function></entry> - <entry><function>pdf_set_info</function> passing - <literal>"Subject"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_info_author</function></entry> - <entry><function>pdf_set_info</function> passing - <literal>"Author"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_info_keywords</function></entry> - <entry><function>pdf_set_info</function> passing - <literal>"Keywords"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_leading</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"leading"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_text_rendering</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"textrendering"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_text_rise</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"textrise"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_horiz_scaling</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"horizscaling"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_text_matrix</function></entry> - <entry>Not available anymore</entry> - </row> - <row> - <entry><function>pdf_set_char_spacing</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"charspacing"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_word_spacing</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"wordspacing"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_transition</function></entry> - <entry><function>pdf_set_parameter</function> passing - <literal>"transition"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_set_duration</function></entry> - <entry><function>pdf_set_value</function> passing - <literal>"duration"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_open_gif</function></entry> - <entry><function>pdf_open_image_file</function> passing - <literal>"gif"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_open_jpeg</function></entry> - <entry><function>pdf_open_image_file</function> passing - <literal>"jpeg"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_open_tiff</function></entry> - <entry><function>pdf_open_image_file</function> passing - <literal>"tiff"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_open_png</function></entry> - <entry><function>pdf_open_image_file</function> passing - <literal>"png"</literal> as the second parameter.</entry> - </row> - <row> - <entry><function>pdf_get_imagewidth</function></entry> - <entry><function>pdf_get_value</function> passing - <literal>"imagewidth"</literal> as the second parameter and the image - as the third parameter.</entry> - </row> - <row> - <entry><function>pdf_get_imageheight</function></entry> - <entry><function>pdf_get_value</function> passing - <literal>"imageheight"</literal> as the second parameter and the - image as the third parameter.</entry> - </row> - <row> - <entry><function></function></entry> - <entry><function></function></entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </sect1> - <sect1 id="pdf.install.pdflib"> - <title>Hints for installation of pdflib 3.x</title> - <simpara> - Since version 3.0 of pdflib you should configure pdflib with the option - <literal>--enable-shared-pdflib</literal>. - </simpara> - </sect1> - <sect1 id="pdf.oldlibs.hints"> - <title>Issues with older versions of pdflib</title> - <simpara> - If you use pdflib 2.01 check how the lib was installed. - There should be a file or a to link libpdf.so. Version 2.01 just creates - a lib with the name libpdf2.01.so which cannot be found when linking - the test programm in configure. You will have to create a symbolic - link from libpdf.so to libpdf2.01.so.). - </simpara> - <simpara> - Version 2.20 of pdflib has introduced more changes to its API and - support for chinese and japanese fonts. This unfortunately causes - some changes of the pdf module of php4 (not php3). If you use pdflib 2.20 - handle the in memory generation of PDF documents with care. Until - pdflib 3.0 is released it might be unstable. The encoding parameter - of <function>pdf_set_font</function> has changed to a string. This - means that instead of e.g. 4 you have to use 'winansi'. - </simpara> - <simpara> - If you use pdflib 2.30 the <function>pdf_set_text_matrix</function> - will have gone. It is not supported any more. In general it is a good - advise to consult the release notes of the used version of pdflib - for possible changes. - </simpara> - <simpara> - Any version of PHP 4 after March, 9th 2000 do 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. - </simpara> - </sect1> - <sect1 id="pdf.examples"> - <title>Examples</title> - <simpara> - 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 - example should help to get started. - It creates the file <filename>test.pdf</filename> - with one page. The page contains the text "Times Roman outlined" in an - outlined, 30pt font. The text is also underlined. - </simpara> - <para> - <example> - <title>Creating a PDF document with pdflib</title> - <programlisting> -<?php -$fp = fopen("test.pdf", "w"); -$pdf = pdf_open($fp); -pdf_set_info($pdf, "Author", "Uwe Steinmann"); -pdf_set_info($pdf, "Title", "Test for PHP wrapper of PDFlib 2.0"); -pdf_set_info($pdf, "Creator", "See Author"); -pdf_set_info($pdf, "Subject", "Testing"); -pdf_begin_page($pdf, 595, 842); -pdf_add_outline($pdf, "Page 1"); -pdf_set_font($pdf, "Times-Roman", 30, "host"); -pdf_set_value($pdf, "textrendering", 1); -pdf_show_xy($pdf, "Times Roman outlined", 50, 750); -pdf_moveto($pdf, 50, 740); -pdf_lineto($pdf, 330, 740); -pdf_stroke($pdf); -pdf_end_page($pdf); -pdf_close($pdf); -fclose($fp); -echo "<A HREF=getpdf.php>finished</A>"; -?> - </programlisting> - <simpara> - The script <filename>getpdf.php</filename> just returns the pdf document. - </simpara> - <informalexample> - <programlisting> -<?php -$fp = fopen("test.pdf", "r"); -header("Content-type: application/pdf"); -fpassthru($fp); -fclose($fp); -?> - </programlisting> - </informalexample> - </example> - </para> - <para> - The pdflib distribution contains a more complex example which - creates a serious of pages with an analog clock. This example - converted into PHP using pdflib looks as the following (you - can see the same example in the documentation for the - <link linkend="ref.cpdf">clibpdf module)</link>: - </para> - <para> - <example> - <title>pdfclock example from pdflib distribution</title> - <programlisting> -<?php -$pdffilename = "clock.pdf"; -$radius = 200; -$margin = 20; -$pagecount = 40; - -$fp = fopen($pdffilename, "w"); -$pdf = pdf_open($fp); -pdf_set_info($pdf, "Creator", "pdf_clock.php3"); -pdf_set_info($pdf, "Author", "Uwe Steinmann"); -pdf_set_info($pdf, "Title", "Analog Clock"); - -while($pagecount-- > 0) { - pdf_begin_page($pdf, 2 * ($radius + $margin), 2 * ($radius + $margin)); - - pdf_set_parameter($pdf, "transition", "wipe"); - pdf_set_value($pdf, "duration", 0.5); - - pdf_translate($pdf, $radius + $margin, $radius + $margin); - pdf_save($pdf); - pdf_setrgbcolor($pdf, 0.0, 0.0, 1.0); - - /* minute strokes */ - pdf_setlinewidth($pdf, 2.0); - for ($alpha = 0; $alpha < 360; $alpha += 6) { - pdf_rotate($pdf, 6.0); - pdf_moveto($pdf, $radius, 0.0); - pdf_lineto($pdf, $radius-$margin/3, 0.0); - pdf_stroke($pdf); - } - - pdf_restore($pdf); - pdf_save($pdf); - - /* 5 minute strokes */ - pdf_setlinewidth($pdf, 3.0); - for ($alpha = 0; $alpha < 360; $alpha += 30) { - pdf_rotate($pdf, 30.0); - pdf_moveto($pdf, $radius, 0.0); - pdf_lineto($pdf, $radius-$margin, 0.0); - pdf_stroke($pdf); - } - - $ltime = getdate(); - - /* draw hour hand */ - pdf_save($pdf); - pdf_rotate($pdf,-(($ltime['minutes']/60.0)+$ltime['hours']-3.0)*30.0); - pdf_moveto($pdf, -$radius/10, -$radius/20); - pdf_lineto($pdf, $radius/2, 0.0); - pdf_lineto($pdf, -$radius/10, $radius/20); - pdf_closepath($pdf); - pdf_fill($pdf); - pdf_restore($pdf); - - /* draw minute hand */ - pdf_save($pdf); - pdf_rotate($pdf,-(($ltime['seconds']/60.0)+$ltime['minutes']-15.0)*6.0); - pdf_moveto($pdf, -$radius/10, -$radius/20); - pdf_lineto($pdf, $radius * 0.8, 0.0); - pdf_lineto($pdf, -$radius/10, $radius/20); - pdf_closepath($pdf); - pdf_fill($pdf); - pdf_restore($pdf); - - /* draw second hand */ - pdf_setrgbcolor($pdf, 1.0, 0.0, 0.0); - pdf_setlinewidth($pdf, 2); - pdf_save($pdf); - pdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0)); - pdf_moveto($pdf, -$radius/5, 0.0); - pdf_lineto($pdf, $radius, 0.0); - pdf_stroke($pdf); - pdf_restore($pdf); - - /* draw little circle at center */ - pdf_circle($pdf, 0, 0, $radius/30); - pdf_fill($pdf); - - pdf_restore($pdf); - - pdf_end_page($pdf); -} - -$pdf = pdf_close($pdf); -fclose($fp); -echo "<A HREF=getpdf.php?filename=".$pdffilename.">finished</A>"; -?> - </programlisting> - <simpara> - The PHP script <filename>getpdf.php</filename> just outputs the pdf document. - </simpara> - <programlisting> -<?php -$fp = fopen($filename, "r"); -header("Content-type: application/pdf"); -fpassthru($fp); -fclose($fp); -?> - </programlisting> - </example></para> - </sect1> - </partintro> - - <refentry id="function.pdf-set-info"> - <refnamediv> - <refname>pdf_set_info</refname> - <refpurpose>Fills a field of the document information</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_info</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>fieldname</parameter></paramdef> - <paramdef>string <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_info</function> function sets an information field - of a pdf document. - Possible values for the fieldname are 'Subject', 'Title', 'Creator', - 'Author', 'Keywords' and one user-defined name. - It can be called before beginning a page. - - <example> - <title>Setting document information</title> - <programlisting> -<?php -$fd = fopen("test.pdf", "w"); -$pdfdoc = pdf_open($fd); -pdf_set_info($pdfdoc, "Author", "Uwe Steinmann"); -pdf_set_info($pdfdoc, "Creator", "Uwe Steinmann"); -pdf_set_info($pdfdoc, "Title", "Testing Info Fields"); -pdf_set_info($pdfdoc, "Subject", "Test"); -pdf_set_info($pdfdoc, "Keywords", "Test, Fields"); -pdf_set_info($pdfdoc, "CustomField", "What ever makes sense"); -pdf_begin_page($pdfdoc, 595, 842); -pdf_end_page($pdfdoc); -pdf_close($pdfdoc); -?> -</programlisting></example></para> - - - <note><simpara> - This function replaces <function>pdf_set_info_keywords</function>, - <function>pdf_set_info_title</function>, - <function>pdf_set_info_subject</function>, - <function>pdf_set_info_creator</function>, - <function>pdf_set_info_sybject</function>. - </simpara></note> - - </refsect1> - </refentry> - - <refentry id="function.pdf-open"> - <refnamediv> - <refname>pdf_open</refname> - <refpurpose>Opens a new pdf document</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open</function></funcdef> - <paramdef>int <parameter>file</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open</function> function opens - a new pdf document. The corresponding file has to be opened - with <function>fopen</function> and the file descriptor passed - as argument <parameter>file</parameter>. - If you do not pass any parameters, the document will be created in memory - and outputed page by page either to stdout or to the web browser. - <note><simpara> - The return value is needed as the first parameter in all other - functions writing to the pdf document. - </simpara></note> - - </para> - <para> - See also <function>fopen</function>, - <function>pdf_close</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-close"> - <refnamediv> - <refname>pdf_close</refname> - <refpurpose>Closes a pdf document</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_close</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_close</function> function closes the pdf document. - </para> - - <para> - See also <function>pdf_open</function>, - <function>fclose</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-begin-page"> - <refnamediv> - <refname>pdf_begin_page</refname> - <refpurpose>Starts new page</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_begin_page</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>width</parameter></paramdef> - <paramdef>double <parameter>height</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_begin_page</function> function starts a new - page with height <parameter>height</parameter> and width - <parameter>width</parameter>. In order to create a valid - document you must call this function and - <function>pdf_end_page</function> at least once.</para> - - <para> - See also <function>pdf_end_page</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-end-page"> - <refnamediv> - <refname>pdf_end_page</refname> - <refpurpose>Ends a page</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_end_page</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_end_page</function> function ends a page. - Once a page is ended it cannot be modified anymore.</para> - - <para> - See also <function>pdf_begin_page</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-show"> - <refnamediv> - <refname>pdf_show</refname> - <refpurpose>Output text at current position</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_show</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_show</function> function outputs the - string <parameter>text</parameter> at the current text position - using the current font.</para> - - <para> - See also <function>pdf_show_xy</function>, - <function>pdf_show_boxed</function>, - <function>pdf_set_text_pos</function>, - <function>pdf_set_font</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-show-boxed"> - <refnamediv> - <refname>pdf_show_boxed</refname> - <refpurpose>Output text in a box</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_show_boxed</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>width</parameter></paramdef> - <paramdef>double <parameter>height</parameter></paramdef> - <paramdef>string <parameter>mode</parameter></paramdef> - <paramdef>string <parameter><optional>feature</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_show_boxed</function> function outputs the - string <parameter>text</parameter> in a box with its lower left position - at (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>). - The boxes dimension is <parameter>height</parameter> by - <parameter>width</parameter>. The parameter <parameter>mode</parameter> - determines how the text is type set. If <parameter>width</parameter> - and <parameter>height</parameter> are zero, the - <parameter>mode</parameter> can be "left", "right" or "center". - If <parameter>width</parameter> or <parameter>height</parameter> is - unequal zero it can also be "justify" and "fulljustify". - </para> - <para>If the parameter <parameter>feature</parameter> is set to "blind", - the text is not shown. - </para> - <para>Returns the number of characters that could not be processed because - they did not fit into the box. - </para> - <para> - See also <function>pdf_show</function>, - <function>pdf_show_xy</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.pdf-show-xy"> - <refnamediv> - <refname>pdf_show_xy</refname> - <refpurpose>Output text at given position</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_show_xy</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_show_xy</function> function outputs the - string <parameter>text</parameter> at position - (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>).</para> - - <para> - See also <function>pdf_show</function>, - <function>pdf_show_boxed</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-font"> - <refnamediv> - <refname>pdf_set_font</refname> - <refpurpose>Selects a font face and size</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_font</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>font name</parameter></paramdef> - <paramdef>double <parameter>size</parameter></paramdef> - <paramdef>string <parameter>encoding</parameter></paramdef> - <paramdef>int <parameter><optional>embed</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_font</function> function sets the - current font face, font size and encoding. If you use pdflib 0.6 - you will need to - provide the Adobe Font Metrics (afm-files) for the font in the - font path (default is ./fonts). If you use php3 or a version of - pdflib older than 2.20 the fourth parameter - <parameter>encoding</parameter> can take the following values: - 0 = builtin, 1 = pdfdoc, 2 = macroman, 3 = macexpert, 4 = winansi. - An encoding greater than 4 and less than 0 will default to winansi. - winansi is often a good choice. - If you use php4 and a version of pdflib >= 2.20 the encoding parameter - has changed to a string. Use 'winansi', 'builtin', 'host', 'macroman' etc. instead. - If the last parameter is set to - 1 the font is embedded into the pdf document otherwise it is not. - To embed a font is usually a good idea if the font is not widely spread - and you cannot ensure that the person watching your document has - access on fonts in the document. - I font is only embedded once even if you call - <function>pdf_set_font</function> several times. - </para> - - <note> - <simpara> - This function has to be called after - <function>pdf_begin_page</function> in order to create a valid - pdf document. - </simpara> - </note> - - <note> - <simpara> - If you reference a font in a .upr file make sure the name - in the afm file and the font name are the same. Otherwise, - the font will be embedded several times (Thanks to Paul Haddon - for finding this.) - </simpara> - </note> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-leading"> - <refnamediv> - <refname>pdf_set_leading</refname> - <refpurpose>Sets distance between text lines</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_leading</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>distance</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_leading</function> function sets the distance - between text lines. This will be used if text is output by - <function>pdf_continue_text</function>.</para> - - <para> - See also <function>pdf_continue_text</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-parameter"> - <refnamediv> - <refname>pdf_set_parameter</refname> - <refpurpose>Sets certain parameters</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_parameter</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>name</parameter></paramdef> - <paramdef>string <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_parameter</function> function sets several - parameters of pdflib which are of the type string.</para> - <para> - See also <function>pdf_get_value</function>, - <function>pdf_set_value</function>, - <function>pdf_get_parameter</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-get-parameter"> - <refnamediv> - <refname>pdf_get_parameter</refname> - <refpurpose>Gets certain parameters</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>pdf_get_parameter</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>name</parameter></paramdef> - <paramdef>double <parameter><optional>modifier</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_get_parameter</function> function gets several - parameters of pdflib which are of the type string. The function parameter - <parameter>modifier</parameter> characterizes the parameter to get. - If the modifier is not needed it has to be 0 or not passed at all.</para> - <para> - See also <function>pdf_get_value</function>, - <function>pdf_set_value</function>, - <function>pdf_set_parameter</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-value"> - <refnamediv> - <refname>pdf_set_value</refname> - <refpurpose>Sets certain numerical value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_value</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>name</parameter></paramdef> - <paramdef>double <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_value</function> function sets several - numerical parameters of pdflib.</para> - <para> - See also <function>pdf_get_value</function>, - <function>pdf_get_parameter</function>, - <function>pdf_set_parameter</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-get-value"> - <refnamediv> - <refname>pdf_get_value</refname> - <refpurpose>Gets certain numerical value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>pdf_get_value</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>name</parameter></paramdef> - <paramdef>double <parameter><optional>modifier</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_get_value</function> function gets several - numerical parameters of pdflib. The function parameter - <parameter>modifier</parameter> characterizes the parameter to get. - If the modifier is not needed it has to be 0 or not passed at all.</para> - <para> - See also <function>pdf_set_value</function>, - <function>pdf_get_parameter</function>, - <function>pdf_set_parameter</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-get-image-height"> - <refnamediv> - <refname>pdf_get_image_height</refname> - <refpurpose>Returns height of an image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>pdf_get_image_height</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_get_image_height</function> function returns the - heights of a pdf image in pixel.</para> - <para> - See also <function>pdf_open_image_file</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_get_image_width</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-get-image-width"> - <refnamediv> - <refname>pdf_get_image_width</refname> - <refpurpose>Returns width of an image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>pdf_get_image_width</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_get_image_width</function> function returns the - widths of a pdf image in pixel.</para> - <para> - See also <function>pdf_open_image_file</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_get_image_height</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-text-rendering"> - <refnamediv> - <refname>pdf_set_text_rendering</refname> - <refpurpose>Determines how text is rendered</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_text_rendering</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>mode</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_text_rendering</function> function determines - how text is rendered. The possible values for <parameter>mode</parameter> - are 0=fill text, 1=stroke text, 2=fill and stroke text, 3=invisible, - 4=fill text and add it to cliping path, 5=stroke text and add it to - clipping path, 6=fill and stroke text and add - it to cliping path, 7=add it to clipping path.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-horiz-scaling"> - <refnamediv> - <refname>pdf_set_horiz_scaling</refname> - <refpurpose>Sets horizontal scaling of text</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_horiz_scaling</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>scale</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_horiz_scaling</function> function sets the - horizontal scaling to <parameter>scale</parameter> percent.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-text-rise"> - <refnamediv> - <refname>pdf_set_text_rise</refname> - <refpurpose>Sets the text rise</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_text_rise</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>rise</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_text_rise</function> function sets the - text rising to <parameter>rise</parameter> points.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-text-matrix"> - <refnamediv> - <refname>pdf_set_text_matrix</refname> - <refpurpose>Sets the text matrix</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_text_matrix</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>array <parameter>matrix</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_text_matrix</function> function sets - a matrix which describes a transformation applied on the current - text font. The matrix has to passed as an array with six elements.</para> - <note><simpara>This function is not available anymore since pdflib 2.3 - </simpara></note> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-text-pos"> - <refnamediv> - <refname>pdf_set_text_pos</refname> - <refpurpose>Sets text position</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_text_pos</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_text_pos</function> function sets the - position of text for the next <function>pdf_show</function> - function call.</para> - <para> - See also <function>pdf_show</function>, - <function>pdf_show_xy</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-char-spacing"> - <refnamediv> - <refname>pdf_set_char_spacing</refname> - <refpurpose>Sets character spacing</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_char_spacing</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>space</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_char_spacing</function> function sets the - spacing between characters.</para> - <para> - See also <function>pdf_set_word_spacing</function>, - <function>pdf_set_leading</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-word-spacing"> - <refnamediv> - <refname>pdf_set_word_spacing</refname> - <refpurpose>Sets spacing between words</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_word_spacing</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>space</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_word_spacing</function> function sets the - spacing between words.</para> - - <para> - See also <function>pdf_set_char_spacing</function>, - <function>pdf_set_leading</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-skew"> - <refnamediv> - <refname>pdf_skew</refname> - <refpurpose>Skews the coordinate system</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_skew</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>alpha</parameter></paramdef> - <paramdef>double <parameter>beta</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_skew</function> function skew the coordinate - system by <parameter>alpha</parameter> (x) and - <parameter>beta</parameter> (y) degrees. - <parameter>alpha</parameter> and <parameter>beta</parameter> may - not be 90 or 270 degrees.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-continue-text"> - <refnamediv> - <refname>pdf_continue_text</refname> - <refpurpose>Outputs text in next line</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_continue_text</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_continue_text</function> function outputs the - string in <parameter>text</parameter> in the next line. - The distance between the lines can be set with - <function>pdf_set_leading</function>.</para> - - <para> - See also <function>pdf_show_xy</function>, - <function>pdf_set_leading</function>, - <function>pdf_set_text_pos</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-stringwidth"> - <refnamediv> - <refname>pdf_stringwidth</refname> - <refpurpose>Returns width of text using current font</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>pdf_stringwidth</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_stringwidth</function> function returns the - width of the string in <parameter>text</parameter> by using the - current font. It requires a font to be set before with - <function>pdf_set_font</function>.</para> - - <para> - See also <function>pdf_set_font</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-save"> - <refnamediv> - <refname>pdf_save</refname> - <refpurpose>Saves the current environment</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_save</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_save</function> function saves the current - environment. It works like the postscript command gsave. Very - useful if you want to translate or rotate an object without effecting - other objects. <function>pdf_save</function> should always be - followed by <function>pdf_restore</function> to restore the environment - before <function>pdf_save</function>.</para> - - <para> - See also <function>pdf_restore</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-restore"> - <refnamediv> - <refname>pdf_restore</refname> - <refpurpose>Restores formerly saved environment</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_restore</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_restore</function> function restores the - environment saved with <function>pdf_save</function>. It works - like the postscript command grestore. - - <example> - <title>Save and Restore</title> - <programlisting> -<?php pdf_save($pdf); -// do all kinds of rotations, transformations, ... -pdf_restore($pdf) ?> -</programlisting></example></para> - - <para> - See also <function>pdf_save</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-translate"> - <refnamediv> - <refname>pdf_translate</refname> - <refpurpose>Sets origin of coordinate system</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_translate</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_translate</function> function sets the origin of - coordinate system to the point (<parameter>x-coor</parameter>, - <parameter>y-coor</parameter>) relativ the current origin. - The following example draws - a line from (0, 0) to (200, 200) relative to the initial coordinate - system. You have to set the current point after - <function>pdf_translate</function> and before you start drawing - more objects. - - <example> - <title>Translation</title> - <programlisting> -<?php pdf_moveto($pdf, 0, 0); -pdf_lineto($pdf, 100, 100); -pdf_stroke($pdf); -pdf_translate($pdf, 100, 100); -pdf_moveto($pdf, 0, 0); -pdf_lineto($pdf, 100, 100); -pdf_stroke($pdf); -?> -</programlisting></example></para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-scale"> - <refnamediv> - <refname>pdf_scale</refname> - <refpurpose>Sets scaling</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_scale</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-scale</parameter></paramdef> - <paramdef>double <parameter>y-scale</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_scale</function> function sets the scaling factor - in both directions. The following example scales x and y direction - by 72. The following line will therefore be drawn one inch in both - directions. - - <example> - <title>Scaling</title> - <programlisting> -<?php pdf_scale($pdf, 72.0, 72.0); -pdf_lineto($pdf, 1, 1); -pdf_stroke($pdf); -?> -</programlisting></example></para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-rotate"> - <refnamediv> - <refname>pdf_rotate</refname> - <refpurpose>Sets rotation</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_rotate</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>angle</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_rotate</function> function sets the rotation in - degress to <parameter>angle</parameter>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setflat"> - <refnamediv> - <refname>pdf_setflat</refname> - <refpurpose>Sets flatness</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setflat</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setflat</function> function sets the flatness to - a value between 0 and 100.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setlinejoin"> - <refnamediv> - <refname>pdf_setlinejoin</refname> - <refpurpose>Sets linejoin parameter</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setlinejoin</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>long <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setlinejoin</function> function sets the linejoin - parameter between a value of 0 and 2.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setlinecap"> - <refnamediv> - <refname>pdf_setlinecap</refname> - <refpurpose>Sets linecap parameter</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setlinecap</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setlinecap</function> function sets the linecap - parameter between a value of 0 and 2.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setmiterlimit"> - <refnamediv> - <refname>pdf_setmiterlimit</refname> - <refpurpose>Sets miter limit</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setmiterlimit</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setmiterlimit</function> function sets the miter limit - to a value greater of equal than 1.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setlinewidth"> - <refnamediv> - <refname>pdf_setlinewidth</refname> - <refpurpose>Sets line width</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setlinewidth</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>width</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setlinewidth</function> function sets the line width - to <parameter>width</parameter>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setdash"> - <refnamediv> - <refname>pdf_setdash</refname> - <refpurpose>Sets dash pattern</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setdash</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>white</parameter></paramdef> - <paramdef>double <parameter>black</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setdash</function> function sets the dash pattern - <parameter>white</parameter> white points and <parameter>black</parameter> - black points. If both are 0 a solid line is set.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-moveto"> - <refnamediv> - <refname>pdf_moveto</refname> - <refpurpose>Sets current point</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_moveto</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_moveto</function> function sets the current point - to the coordinates <parameter>x-coor</parameter> and - <parameter>y-coor</parameter>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-curveto"> - <refnamediv> - <refname>pdf_curveto</refname> - <refpurpose>Draws a curve</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_curveto</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x1</parameter></paramdef> - <paramdef>double <parameter>y1</parameter></paramdef> - <paramdef>double <parameter>x2</parameter></paramdef> - <paramdef>double <parameter>y2</parameter></paramdef> - <paramdef>double <parameter>x3</parameter></paramdef> - <paramdef>double <parameter>y3</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_curveto</function> function draws a Bezier curve - from the current point to the point - (<parameter>x3</parameter>, <parameter>y3</parameter>) using - (<parameter>x1</parameter>, <parameter>y1</parameter>) and - (<parameter>x2</parameter>, <parameter>y2</parameter>) as control - points.</para> - - <para> - See also <function>pdf_moveto</function>, - <function>pdf_lineto</function>, - <function>pdf_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-lineto"> - <refnamediv> - <refname>pdf_lineto</refname> - <refpurpose>Draws a line</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_lineto</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_lineto</function> function draws a line from - the current point to the point with coordinates - (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>).</para> - - <para> - See also <function>pdf_moveto</function>, - <function>pdf_curveto</function>, - <function>pdf_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-circle"> - <refnamediv> - <refname>pdf_circle</refname> - <refpurpose>Draws a circle</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_circle</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>radius</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_circle</function> function draws a circle with - center at point - (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>) - and radius <parameter>radius</parameter>.</para> - - <para> - See also <function>pdf_arc</function>, - <function>pdf_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-arc"> - <refnamediv> - <refname>pdf_arc</refname> - <refpurpose>Draws an arc</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_arc</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>radius</parameter></paramdef> - <paramdef>double <parameter>start</parameter></paramdef> - <paramdef>double <parameter>end</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_arc</function> function draws an arc with - center at point - (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>) - and radius <parameter>radius</parameter>, starting at angle - <parameter>start</parameter> and ending at angle - <parameter>end</parameter>.</para> - - <para> - See also <function>pdf_circle</function>, - <function>pdf_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-rect"> - <refnamediv> - <refname>pdf_rect</refname> - <refpurpose>Draws a rectangle</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_rect</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>width</parameter></paramdef> - <paramdef>double <parameter>height</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_rect</function> function draws a rectangle with - its lower left corner at point - (<parameter>x-coor</parameter>, <parameter>y-coor</parameter>). - This width is set to <parameter>width</parameter>. - This height is set to <parameter>height</parameter>.</para> - - <para> - See also <function>pdf_stroke</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-closepath"> - <refnamediv> - <refname>pdf_closepath</refname> - <refpurpose>Closes path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_closepath</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_closepath</function> function closes the - current path. This means, it draws a line from current point to - the point where the first line was started. Many functions like - <function>pdf_moveto</function>, <function>pdf_circle</function> - and <function>pdf_rect</function> start a new path.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-stroke"> - <refnamediv> - <refname>pdf_stroke</refname> - <refpurpose>Draws line along path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_stroke</function> function draws a line along - current path. The current path is the sum of all line drawing. - Without this function the line would not be drawn.</para> - - <para> - See also <function>pdf_closepath</function>, - <function>pdf_closepath_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-closepath-stroke"> - <refnamediv> - <refname>pdf_closepath_stroke</refname> - <refpurpose>Closes path and draws line along path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_closepath_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_closepath_stroke</function> function is a - combination of <function>pdf_closepath</function> and - <function>pdf_stroke</function>. It also clears the path.</para> - - <para> - See also <function>pdf_closepath</function>, - <function>pdf_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-fill"> - <refnamediv> - <refname>pdf_fill</refname> - <refpurpose>Fills current path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_fill</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_fill</function> function fills the interior of - the current path with the current fill color.</para> - - <para> - See also <function>pdf_closepath</function>, - <function>pdf_stroke</function>, - <function>pdf_setgray_fill</function>, - <function>pdf_setgray</function>, - <function>pdf_setrgbcolor_fill</function>, - <function>pdf_setrgbcolor</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-fill-stroke"> - <refnamediv> - <refname>pdf_fill_stroke</refname> - <refpurpose>Fills and strokes current path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_fill_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_fill_stroke</function> function fills the interior of - the current path with the current fill color and draws current path.</para> - - <para> - See also <function>pdf_closepath</function>, - <function>pdf_stroke</function>, - <function>pdf_fill</function>, - <function>pdf_setgray_fill</function>, - <function>pdf_setgray</function>, - <function>pdf_setrgbcolor_fill</function>, - <function>pdf_setrgbcolor</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-closepath-fill-stroke"> - <refnamediv> - <refname>pdf_closepath_fill_stroke</refname> - <refpurpose>Closes, fills and strokes current path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_closepath_fill_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_closepath_fill_stroke</function> function closes, - fills the interior of - the current path with the current fill color and draws current path.</para> - - <para> - See also <function>pdf_closepath</function>, - <function>pdf_stroke</function>, - <function>pdf_fill</function>, - <function>pdf_setgray_fill</function>, - <function>pdf_setgray</function>, - <function>pdf_setrgbcolor_fill</function>, - <function>pdf_setrgbcolor</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-endpath"> - <refnamediv> - <refname>pdf_endpath</refname> - <refpurpose>Ends current path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_endpath</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_endpath</function> function ends - the current path but does not close it.</para> - - <para> - See also <function>pdf_closepath</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-clip"> - <refnamediv> - <refname>pdf_clip</refname> - <refpurpose>Clips to current path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_clip</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_clip</function> function clips all drawing - to the current path.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setgray-fill"> - <refnamediv> - <refname>pdf_setgray_fill</refname> - <refpurpose>Sets filling color to gray value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setgray_fill</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>gray value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setgray_fill</function> function sets the current - gray value to fill a path.</para> - - <para> - See also <function>pdf_setrgbcolor_fill</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setgray-stroke"> - <refnamediv> - <refname>pdf_setgray_stroke</refname> - <refpurpose>Sets drawing color to gray value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setgray_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>gray value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setgray_stroke</function> function sets the current - drawing color to the given gray value.</para> - - <para> - See also <function>pdf_setrgbcolor_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setgray"> - <refnamediv> - <refname>pdf_setgray</refname> - <refpurpose>Sets drawing and filling color to gray value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setgray</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>gray value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setgray</function> function sets the current - drawing and filling color to the given gray value.</para> - - <para> - See also <function>pdf_setrgbcolor_stroke</function>, - <function>pdf_setrgbcolor_fill</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setrgbcolor-fill"> - <refnamediv> - <refname>pdf_setrgbcolor_fill</refname> - <refpurpose>Sets filling color to rgb color value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setrgbcolor_fill</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>red value</parameter></paramdef> - <paramdef>double <parameter>green value</parameter></paramdef> - <paramdef>double <parameter>blue value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setrgbcolor_fill</function> function sets the current - rgb color value to fill a path.</para> - - <para> - See also <function>pdf_setrgbcolor_fill</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setrgbcolor-stroke"> - <refnamediv> - <refname>pdf_setrgbcolor_stroke</refname> - <refpurpose>Sets drawing color to rgb color value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setrgbcolor_stroke</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>red value</parameter></paramdef> - <paramdef>double <parameter>green value</parameter></paramdef> - <paramdef>double <parameter>blue value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setrgbcolor_stroke</function> function sets the current - drawing color to the given rgb color value.</para> - - <para> - See also <function>pdf_setrgbcolor_stroke</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-setrgbcolor"> - <refnamediv> - <refname>pdf_setrgbcolor</refname> - <refpurpose>Sets drawing and filling color to rgb color value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_setrgbcolor</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>red value</parameter></paramdef> - <paramdef>double <parameter>green value</parameter></paramdef> - <paramdef>double <parameter>blue value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_setrgbcolor_stroke</function> function sets the current - drawing and filling color to the given rgb color value.</para> - - <para> - See also <function>pdf_setrgbcolor_stroke</function>, - <function>pdf_setrgbcolor_fill</function>.</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-add-outline"> - <refnamediv> - <refname>pdf_add_outline</refname> - <refpurpose>Adds bookmark for current page</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_add_outline</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>text</parameter></paramdef> - <paramdef>int <parameter><optional>parent</optional></parameter></paramdef> - <paramdef>int <parameter><optional>open</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_add_outline</function> function adds a bookmark - with text <parameter>text</parameter> that points to the current page. - The bookmark is inserted as a child of <parameter>parent</parameter> and - is by default open if <parameter>open</parameter> is not 0. The - return value is an identifier for the bookmark which can be used - as a parent for other bookmarks. Therefore you can build up hierarchies - of bookmarks. - </para> - <simpara> - Unfortunately pdflib does not make a copy of the string, which forces - PHP to allocate the memory. Currently this piece of memory is not - been freed by any PDF function but it will be taken care of by the - PHP memory manager.</simpara> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-transition"> - <refnamediv> - <refname>pdf_set_transition</refname> - <refpurpose>Sets transition between pages</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_transition</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>transition</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_transition</function> function set the transition - between following pages. The value of <parameter>transition</parameter> - can be - - <simplelist> - <member> - 0 for none, - </member> - <member> - 1 for two lines sweeping across the screen reveal the page, - </member> - <member> - 2 for multiple lines sweeping across the screen reveal the page, - </member> - <member> - 3 for a box reveals the page, - </member> - <member> - 4 for a single line sweeping across the screen reveals the page, - </member> - <member> - 5 for the old page dissolves to reveal the page, - </member> - <member> - 6 for the dissolve effect moves from one screen edge to another, - </member> - <member> - 7 for the old page is simply replaced by the new page (default) - </member> - </simplelist></para> - <para> - See also <function>pdf_set_duration</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-duration"> - <refnamediv> - <refname>pdf_set_duration</refname> - <refpurpose>Sets duration between pages</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_duration</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>duration</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_duration</function> function set the duration - between following pages in seconds.</para> - <para> - See also <function>pdf_set_transition</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-gif"> - <refnamediv> - <refname>pdf_open_gif</refname> - <refpurpose>Opens a GIF image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open_gif</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>filename</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open_gif</function> function opens an image stored - in the file with the name <parameter>filename</parameter>. - The format of the image has to be gif. The function returns a pdf - image identifier. - <note><simpara>This function shouldn't be used anymore. Please use - the function <function>pdf_open_image_file</function> instead. - </simpara></note> - - <example> - <title>Including a gif image</title> - <programlisting> -<?php -$im = pdf_open_gif($pdf, "test.gif"); -pdf_place_image($pdf, $im, 100, 100, 1); -pdf_close_image($pdf, $im); -?> - </programlisting> - </example></para> - - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_jpeg</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-png"> - <refnamediv> - <refname>pdf_open_png</refname> - <refpurpose> - Opens a PNG image - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int - <function>pdf_open_png</function> - </funcdef> - <paramdef>int - <parameter>pdf</parameter> - </paramdef> - <paramdef>string - <parameter>png_file</parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open_png</function> function opens an image stored - in the file with the name <parameter>filename</parameter>. - The format of the image has to be png. The function returns a pdf - image identifier. - <note><simpara>This function shouldn't be used anymore. Please use - the function <function>pdf_open_image_file</function> instead. - </simpara></note> - <example> - <title>Including a PNG image</title> - <programlisting> -<?php -$im = pdf_open_png ($pdf, "test.png"); -pdf_place_image ($pdf, $im, 100, 100, 1); -pdf_close_image ($pdf, $im); -?> - </programlisting> - </example> - </para> - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_jpeg</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-image-file"> - <refnamediv> - <refname>pdf_open_image_file</refname> - <refpurpose>Reads an image from a file</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open_image_file</function></funcdef> - <paramdef>int <parameter>PDF-document</parameter></paramdef> - <paramdef>string <parameter>format</parameter></paramdef> - <paramdef>string <parameter>filename</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The function <function>pdf_open_image_file</function> reads an image - of format <parameter>format</parameter> from the file - <parameter>filename</parameter>. - Possible formats are 'png', 'tiff', 'jpeg' and 'gif'. - The function returns a pdf image identifier. - <example> - <title>Inserting an image</title> - <programlisting> -<?php -$pim = pdf_open_image_file($pdf, "png", "picture.png"); -pdf_place_image($pdf, $pim, 100, 100, 1); -pdf_close_image($pdf, $pim); -?> - </programlisting> - </example></para> - - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_jpeg</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_tiff</function>, - <function>pdf_open_png</function>, - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-memory-image"> - <refnamediv> - <refname>pdf_open_memory_image</refname> - <refpurpose>Opens an image created with PHP's image functions</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open_memory_image</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open_memory_image</function> function takes - an image created with the PHP's image functions and makes it available - for the pdf document. The function returns a pdf - image identifier. - - <example> - <title>Including a memory image</title> - <programlisting> -<?php -$im = ImageCreate(100, 100); -$col = ImageColorAllocate($im, 80, 45, 190); -ImageFill($im, 10, 10, $col); -$pim = pdf_open_memory_image($pdf, $im); -ImageDestroy($im); -pdf_place_image($pdf, $pim, 100, 100, 1); -pdf_close_image($pdf, $pim); -?> - </programlisting> - </example></para> - - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_jpeg</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_png</function> - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-jpeg"> - <refnamediv> - <refname>pdf_open_jpeg</refname> - <refpurpose>Opens a JPEG image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open_jpeg</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>filename</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open_jpeg</function> function opens an image stored - in the file with the name <parameter>filename</parameter>. - The format of the image has to be jpeg. The function returns a pdf - image identifier. - <note><simpara>This function shouldn't be used anymore. Please use - the function <function>pdf_open_image_file</function> instead. - </simpara></note></para> - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_png</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-open-tiff"> - <refnamediv> - <refname>pdf_open_tiff</refname> - <refpurpose>Opens a TIFF image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pdf_open_tiff</function></funcdef> - <paramdef>int <parameter>PDF-document</parameter></paramdef> - <paramdef>string <parameter>filename</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_open_tiff</function> function opens an image stored - in the file with the name <parameter>filename</parameter>. - The format of the image has to be tiff. The function returns a pdf - image identifier. - <note><simpara>This function shouldn't be used anymore. Please use - the function <function>pdf_open_image_file</function> instead. - </simpara></note> - </para> - <para> - See also <function>pdf_close_image</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_jpeg</function>, - <function>pdf_open_png</function>, - <function>pdf_open_memory_image</function>, - <function>pdf_execute_image</function>, - <function>pdf_place_image</function>, - <function>pdf_put_image</function>. - </para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-close-image"> - <refnamediv> - <refname>pdf_close_image</refname> - <refpurpose>Closes an image</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_close_image</function></funcdef> - <paramdef>int <parameter>image</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_close_image</function> function closes an image - which has been opened with any of the <function>pdf_open_xxx</function> - functions.</para> - <para> - See also <function>pdf_open_jpeg</function>, - <function>pdf_open_gif</function>, - <function>pdf_open_memory_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-place-image"> - <refnamediv> - <refname>pdf_place_image</refname> - <refpurpose>Places an image on the page</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_place_image</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>scale</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_place_image</function> function places an image - on the page at postion (<parameter>x-coor</parameter>, - <parameter>x-coor</parameter>). The image can be scaled at the same - time. - </para> - <para> - See also <function>pdf_put_image</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.pdf-put-image"> - <refnamediv> - <refname>pdf_put_image</refname> - <refpurpose>Stores an image in the PDF for later use</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_put_image</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_put_image</function> function places an image - in the PDF file without showing it. The stored image can be - displayed with the <function>pdf_execute_image</function> - function as many times as needed. This is useful when using the same - image multiple times in order to keep the file size small. Using - <function>pdf_put_image</function> and - <function>pdf_execute_image</function> is highly recommended for - larger images (several kb) if they show up more than once in the - document. - <note><simpara>This function has become meaningless with version - 2.01 of pdflib. It will just output a warning.</simpara> - </note></para> - <para> - See also <function>pdf_put_image</function>, - <function>pdf_place_image</function>, - <function>pdf_execute_image</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-execute-image"> - <refnamediv> - <refname>pdf_execute_image</refname> - <refpurpose>Places a stored image on the page</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_execute_image</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>int <parameter>image</parameter></paramdef> - <paramdef>double <parameter>x-coor</parameter></paramdef> - <paramdef>double <parameter>y-coor</parameter></paramdef> - <paramdef>double <parameter>scale</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_execute_image</function> function displays an image that has been - put in the PDF file with the <function>pdf_put_image</function> - function on the current page at the given coordinates.</para> - <para> - The image can be scaled while displaying it. A scale of 1.0 - will show the image in the original size. - <note><simpara>This function has become meaningless with version - 2.01 of pdflib. It will just output a warning.</simpara> - </note> - - <example> - <title>Multiple show of an image</title> - <programlisting> -<?php -$im = ImageCreate(100, 100); -$col1 = ImageColorAllocate($im, 80, 45, 190); -ImageFill($im, 10, 10, $col1); -$pim = pdf_open_memory_image($pdf, $im); -pdf_put_image($pdf, $pim); -pdf_execute_image($pdf, $pim, 100, 100, 1); -pdf_execute_image($pdf, $pim, 200, 200, 2); -pdf_close_image($pdf, $pim); -?> - </programlisting> - </example></para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-add-annotation"> - <refnamediv> - <refname>pdf_add_annotation</refname> - <refpurpose>Adds annotation</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_add_annotation</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>llx</parameter></paramdef> - <paramdef>double <parameter>lly</parameter></paramdef> - <paramdef>double <parameter>urx</parameter></paramdef> - <paramdef>double <parameter>ury</parameter></paramdef> - <paramdef>string <parameter>title</parameter></paramdef> - <paramdef>string <parameter>content</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_add_annotation</function> adds a note with - the lower left corner at (<parameter>llx</parameter>, - <parameter>lly</parameter>) and the upper right corner at - (<parameter>urx</parameter>, <parameter>ury</parameter>).</para> - - </refsect1> - </refentry> - - <refentry id="function.pdf-set-border-style"> - <refnamediv> - <refname>pdf_set_border_style</refname> - <refpurpose>Sets style of border around links and annotations</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_border_style</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>string <parameter>style</parameter></paramdef> - <paramdef>double <parameter>width</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_border_style</function> function sets the - style and width of the suroundig box of links and annotations. - The parameter <parameter>style</parameter> can be 'solid' or - 'dashed'.</para> - <para> - See also <function>pdf_set_border_color</function>, - <function>pdf_set_border_dash</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-border-color"> - <refnamediv> - <refname>pdf_set_border_color</refname> - <refpurpose>Sets color of border around links and annotations</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_border_color</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>red</parameter></paramdef> - <paramdef>double <parameter>green</parameter></paramdef> - <paramdef>double <parameter>blue</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_border_color</function> function sets the - color of the suroundig box of links and annotations. - The three color components have to have a value between 0.0 and - 1.0.</para> - <para> - See also <function>pdf_set_border_style</function>, - <function>pdf_set_border_dash</function>.</para> - </refsect1> - </refentry> - - <refentry id="function.pdf-set-border-dash"> - <refnamediv> - <refname>pdf_set_border_dash</refname> - <refpurpose>Sets dash style of border around links and annotations</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pdf_set_border_dash</function></funcdef> - <paramdef>int <parameter>pdf document</parameter></paramdef> - <paramdef>double <parameter>black</parameter></paramdef> - <paramdef>double <parameter>white</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - The <function>pdf_set_border_dash</function> function sets the - lenght of - black and white areas of a dashed line of the suroundig box of - links and annotations.</para> - <para> - See also <function>pdf_set_border_style</function>, - <function>pdf_set_border_color</function>.</para> - </refsect1> - </refentry> - - </reference> - -<!-- 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 -sgml-parent-document:nil -sgml-default-dtd-file:"../../manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> + <reference id="ref.pdf"> + <title>PDF functions </title> + <titleabbrev>PDF</titleabbrev> + + <partintro> + <sect1 id="pdf.intro"> + <title>Introduction</title> + <simpara> + You can use the PDF functions in PHP to create PDF files if you + have the PDF library by Thomas Merz (available at + <ulink url="&url.pdf;">&url.pdf;</ulink>; + you will also need <ulink url="&url.jpeg;">the JPEG library</ulink> + and <ulink url="&url.tiff;">the TIFF library</ulink> to + compile this. These two libs also quite often make problems when + configuring php. Follow the messages of configure to fix possible + problems. + </simpara> + <simpara> + 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. + </simpara> + <simpara> + 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. + There are generally 72 PostScript points to an inch, but this + depends on the output resolution. + </simpara> + <simpara> + There is another PHP module for pdf document creation based on + <ulink url="&url.cpdf;">FastIO's</ulink>. + ClibPDF. It has a slightly different API. Check the + <link linkend="ref.cpdf">ClibPDF functions</link> section for + details. + </simpara> + <simpara> + The pdf module introduces one new type of variable. + It is called <parameter>pdf object</parameter> and + almost all functions need <parameter>pdf object</parameter> + as its first parameter. + </simpara> + </sect1> + <sect1 id="pdf.oldlibs.confusion"> + <title>Confusion with old PDFlib versions</title> + <simpara> + Starting with php V4.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. + For compatibility reasons this binding for + PDFlib still will support 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 + functions. + </simpara> + <para> + <table> + <title>Deprecated functions and its replacements</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Old function</entry> + <entry>Replacement</entry> + </row> + </thead> + <tbody> + <row> + <entry><function>PDF_put_image</function></entry> + <entry>Not needed anymore.</entry> + </row> + <row> + <entry><function>PDF_execute_image</function></entry> + <entry>Not needed anymore.</entry> + </row> + <row> + <entry><function>PDF_get_annotation</function></entry> + <entry><function>PDF_get_bookmark</function> using the same + parameters.</entry> + </row> + <row> + <entry><function>PDF_get_font</function></entry> + <entry><function>PDF_get_value</function> passing + <literal>"font"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_get_fontsize</function></entry> + <entry><function>PDF_get_value</function> passing + <literal>"fontsize"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_get_fontname</function></entry> + <entry><function>PDF_get_parameter</function> passing + <literal>"fontname"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_info_creator</function></entry> + <entry><function>PDF_set_info</function> passing + <literal>"Creator"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_info_title</function></entry> + <entry><function>PDF_set_info</function> passing + <literal>"Title"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_info_subject</function></entry> + <entry><function>PDF_set_info</function> passing + <literal>"Subject"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_info_author</function></entry> + <entry><function>PDF_set_info</function> passing + <literal>"Author"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_info_keywords</function></entry> + <entry><function>PDF_set_info</function> passing + <literal>"Keywords"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_leading</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"leading"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_text_rendering</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"textrendering"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_text_rise</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"textrise"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_horiz_scaling</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"horizscaling"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_text_matrix</function></entry> + <entry>Not available anymore</entry> + </row> + <row> + <entry><function>PDF_set_char_spacing</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"charspacing"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_word_spacing</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"wordspacing"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_set_transition</function></entry> + <entry><function>PDF_set_parameter</function> passing + <literal>"transition"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_open</function></entry> + <entry><function>PDF_new</function> plus an subsequent call + of <function>PDF_open_file</function></entry> + </row> + <row> + <entry><function>PDF_set_font</function></entry> + <entry><function>PDF_findfont</function> plus an subsequent call + of <function>PDF_setfont</function></entry> + </row> + <row> + <entry><function>PDF_set_duration</function></entry> + <entry><function>PDF_set_value</function> passing + <literal>"duration"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_open_gif</function></entry> + <entry><function>PDF_open_image_file</function> passing + <literal>"gif"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_open_jpeg</function></entry> + <entry><function>PDF_open_image_file</function> passing + <literal>"jpeg"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_open_tiff</function></entry> + <entry><function>PDF_open_image_file</function> passing + <literal>"tiff"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_open_png</function></entry> + <entry><function>PDF_open_image_file</function> passing + <literal>"png"</literal> as the second parameter.</entry> + </row> + <row> + <entry><function>PDF_get_image_width</function></entry> + <entry><function>PDF_get_value</function> passing + <literal>"imagewidth"</literal> as the second parameter and the image + as the third parameter.</entry> + </row> + <row> + <entry><function>PDF_get_image_height</function></entry> + <entry><function>PDF_get_value</function> passing + <literal>"imageheight"</literal> as the second parameter and the + image as the third parameter.</entry> + </row> + <row> + <entry><function></function></entry> + <entry><function></function></entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </sect1> + <sect1 id="pdf.install.pdflib"> + <title>Hints for installation of PDFlib 3.x</title> + <simpara> + Since version 3.0 of PDFlib you should configure PDFlib with the option + <literal>--enable-shared-pdflib</literal>. + </simpara> + </sect1> + <sect1 id="pdf.oldlibs.hints"> + <title>Issues with older versions of PDFlib</title> + <simpara> + Any version of PHP 4 after March, 9th 2000 do not support versions + of PDFlib older than 3.0. + </simpara> + <simpara> + 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. + </simpara> + </sect1> + <sect1 id="pdf.examples"> + <title>Examples</title> + <simpara> + 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 + example should help to get started. + It creates the file <filename>test.pdf</filename> + with one page. The page contains the text "Times Roman outlined" in an + outlined, 30pt font. The text is also underlined. + </simpara> + <para> + <example> + <title>Creating a PDF document with PDFlib</title> + <programlisting> +<?php +$pdf = PDF_new(); +PDF_open_file($pdf, "test.pdf"); +PDF_set_info($pdf, "Author", "Uwe Steinmann"); +PDF_set_info($pdf, "Title", "Test for PHP wrapper of PDFlib 2.0"); +PDF_set_info($pdf, "Creator", "See Author"); +PDF_set_info($pdf, "Subject", "Testing"); +PDF_begin_page($pdf, 595, 842); +PDF_add_outline($pdf, "Page 1"); +PDF_set_font($pdf, "Times-Roman", 30, "host"); +PDF_set_value($pdf, "textrendering", 1); +PDF_show_xy($pdf, "Times Roman outlined", 50, 750); +PDF_moveto($pdf, 50, 740); +PDF_lineto($pdf, 330, 740); +PDF_stroke($pdf); +PDF_end_page($pdf); +PDF_close($pdf); +PDF_delete($pdf); +echo "<A HREF=getpdf.php>finished</A>"; +?> + </programlisting> + <simpara> + The script <filename>getpdf.php</filename> just returns the pdf document. + </simpara> + <informalexample> + <programlisting> +<?php +$fp = fopen("test.pdf", "r"); +header("Content-type: application/pdf"); +fpassthru($fp); +fclose($fp); +?> + </programlisting> + </informalexample> + </example> + </para> + <para> + The PDFlib distribution contains a more complex example which + creates a page with an analog clock. Here we use + the in memory creation feature of PDFlib, so we don't need + any tmp-files. This example + converted into PHP using PDFlib looks as the following (you + can see the same example in the documentation for the + <link linkend="ref.cpdf">clibpdf module)</link>: + </para> + <para> + <example> + <title>pdfclock example from PDFlib distribution</title> + <programlisting> +<?php +$radius = 200; +$margin = 20; +$pagecount = 10; + +$pdf = PDF_new(); + +if (!PDF_open_file($pdf, "")) { + print error; + exit; +}; + +PDF_set_parameter($pdf, "warning", "true"); + +PDF_set_info($pdf, "Creator", "pdf_clock.php"); +PDF_set_info($pdf, "Author", "Uwe Steinmann"); +PDF_set_info($pdf, "Title", "Analog Clock"); + +while($pagecount-- > 0) { + PDF_begin_page($pdf, 2 * ($radius + $margin), 2 * ($radius + $margin)); + + PDF_set_parameter($pdf, "transition", "wipe"); + PDF_set_value($pdf, "duration", 0.5); + + PDF_translate($pdf, $radius + $margin, $radius + $margin); + PDF_save($pdf); + PDF_setrgbcolor($pdf, 0.0, 0.0, 1.0); + + /* minute strokes */ + PDF_setlinewidth($pdf, 2.0); + for ($alpha = 0; $alpha < 360; $alpha += 6) { + PDF_rotate($pdf, 6.0); + PDF_moveto($pdf, $radius, 0.0); + PDF_lineto($pdf, $radius-$margin/3, 0.0); + PDF_stroke($pdf); + } + + PDF_restore($pdf); + PDF_save($pdf); + + /* 5 minute strokes */ + PDF_setlinewidth($pdf, 3.0); + for ($alpha = 0; $alpha < 360; $alpha += 30) { + PDF_rotate($pdf, 30.0); + PDF_moveto($pdf, $radius, 0.0); + PDF_lineto($pdf, $radius-$margin, 0.0); + PDF_stroke($pdf); + } + + $ltime = getdate(); + + /* draw hour hand */ + PDF_save($pdf); + PDF_rotate($pdf,-(($ltime['minutes']/60.0)+$ltime['hours']-3.0)*30.0); + PDF_moveto($pdf, -$radius/10, -$radius/20); + PDF_lineto($pdf, $radius/2, 0.0); + PDF_lineto($pdf, -$radius/10, $radius/20); + PDF_closepath($pdf); + PDF_fill($pdf); + PDF_restore($pdf); + + /* draw minute hand */ + PDF_save($pdf); + PDF_rotate($pdf,-(($ltime['seconds']/60.0)+$ltime['minutes']-15.0)*6.0); + PDF_moveto($pdf, -$radius/10, -$radius/20); + PDF_lineto($pdf, $radius * 0.8, 0.0); + PDF_lineto($pdf, -$radius/10, $radius/20); + PDF_closepath($pdf); + PDF_fill($pdf); + PDF_restore($pdf); + + /* draw second hand */ + PDF_setrgbcolor($pdf, 1.0, 0.0, 0.0); + PDF_setlinewidth($pdf, 2); + PDF_save($pdf); + PDF_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0)); + PDF_moveto($pdf, -$radius/5, 0.0); + PDF_lineto($pdf, $radius, 0.0); + PDF_stroke($pdf); + PDF_restore($pdf); + + /* draw little circle at center */ + PDF_circle($pdf, 0, 0, $radius/30); + PDF_fill($pdf); + + PDF_restore($pdf); + + PDF_end_page($pdf); + + # to see some difference + sleep(1); +} + +PDF_close($pdf); + +$buf = PDF_get_buffer($pdf); +$len = strlen($buf); + +header("Content-type: application/pdf"); +header("Content-Length: $len"); +header("Content-Disposition: inline; filename=foo.pdf"); +print $buf; + +PDF_delete($pdf); +?> + </programlisting> + </example> + </para> + </sect1> + </partintro> + + <refentry id="function.pdf-add-annotation"> + <refnamediv> + <refname>PDF_add_annotation</refname> + <refpurpose>Deprecitad: Adds annotation</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + The <function>PDF_add_outline</function> is replaced by + <function>PDF_add_note</function> + </para> + <para> + See also <function>PDF_add_note</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-bookmark"> + <refnamediv> + <refname>PDF_add_bookmark</refname> + <refpurpose>Adds bookmark for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_bookmark</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>int <parameter><optional>parent</optional></parameter></paramdef> + <paramdef>int <parameter><optional>open</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a nested bookmark under <parameter>parent</parameter>, or a new top-level + bookmark if <parameter>parent</parameter> = 0. Returns a bookmark descriptor + which may be used as parent for subsequent nested bookmarks. + If open = 1, child bookmarks will be folded out, and invisible if open = 0. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-launchlink"> + <refnamediv> + <refname>PDF_add_launchlink</refname> + <refpurpose>Add a launch annotation for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_launchlink</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a launch annotation (to a target of arbitrary file type). + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-locallink"> + <refnamediv> + <refname>PDF_add_locallink</refname> + <refpurpose>Add a link annotation for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_locallink</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>int <parameter>page</parameter></paramdef> + <paramdef>string <parameter>dest</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a link annotation to a target within the current PDF file. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-note"> + <refnamediv> + <refname>PDF_add_note</refname> + <refpurpose>Add a note annotation for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_note</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>string <parameter>contents</parameter></paramdef> + <paramdef>string <parameter>title</parameter></paramdef> + <paramdef>string <parameter>icon</parameter></paramdef> + <paramdef>int <parameter>open</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a note annotation. icon is one of of "comment, "insert", "note", + "paragraph", "newparagraph", "key", or "help". + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-outline"> + <refnamediv> + <refname>pdf_add_outline</refname> + <refpurpose>Depriciated: Adds bookmark for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_add_bookmark</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-pdflink"> + <refnamediv> + <refname>PDF_add_pdflink</refname> + <refpurpose>Adds file link annotation for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_pdflink</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + <paramdef>int <parameter>page</parameter></paramdef> + <paramdef>string <parameter>dest</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a file link annotation (to a PDF target). + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-add-weblink"> + <refnamediv> + <refname>PDF_add_weblink</refname> + <refpurpose>Adds weblink for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_add_weblink</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>string <parameter>url</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a weblink annotation to a target URL on the Web. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-arc"> + <refnamediv> + <refname>PDF_arc</refname> + <refpurpose>Draws an arc</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_arc</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>double <parameter>r</parameter></paramdef> + <paramdef>double <parameter>alpha</parameter></paramdef> + <paramdef>double <parameter>beta</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Draw a counterclockwise circular arc from alpha to beta degrees + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-attach-file"> + <refnamediv> + <refname>PDF_attach_file</refname> + <refpurpose>Adds a file attachement for current page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_attach_file</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>llx</parameter></paramdef> + <paramdef>double <parameter>lly</parameter></paramdef> + <paramdef>double <parameter>urx</parameter></paramdef> + <paramdef>double <parameter>ury</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + <paramdef>string <parameter>description</parameter></paramdef> + <paramdef>string <parameter>author</parameter></paramdef> + <paramdef>string <parameter>mimetype</parameter></paramdef> + <paramdef>string <parameter>iocn</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a file attachment annotation. icon is one of "graph, + "paperclip", "pushpin", or "tag". + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-begin-page"> + <refnamediv> + <refname>PDF_begin_page</refname> + <refpurpose>Starts new page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_begin_page</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>width</parameter></paramdef> + <paramdef>double <parameter>height</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Add a new page to the document. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-circle"> + <refnamediv> + <refname>PDF_circle</refname> + <refpurpose>Draws a circle</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_circle</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>double <parameter>r</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Draw a circle with center (x, y) and radius r. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-clip"> + <refnamediv> + <refname>PDF_clip</refname> + <refpurpose>Clips to current path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_clip</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Use the current path as clipping path. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-close"> + <refnamediv> + <refname>PDF_close</refname> + <refpurpose>Closes a pdf object</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_close</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Close the generated PDF file, and free all document-related resources. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-closepath"> + <refnamediv> + <refname>PDF_closepath</refname> + <refpurpose>Closes path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_closepath</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Close the current path. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-closepath-fill-stroke"> + <refnamediv> + <refname>PDF_closepath_fill_stroke</refname> + <refpurpose>Closes, fills and strokes current path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_closepath_fill_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Close the path, fill, and stroke it. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-closepath-stroke"> + <refnamediv> + <refname>PDF_closepath_stroke</refname> + <refpurpose>Closes path and draws line along path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_closepath_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Close the path, and stroke it. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-close-image"> + <refnamediv> + <refname>PDF_close_image</refname> + <refpurpose>Closes an image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_close_image</function></funcdef> + <paramdef>int <parameter>image</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Close an <parameter>image</parameter> retrieved with one of the + <function>PDF_open_image*()</function> functions. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-concat"> + <refnamediv> + <refname>PDF_concat</refname> + <refpurpose>Concatenate a matrix to the CTM</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_concat</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>a</parameter></paramdef> + <paramdef>double <parameter>b</parameter></paramdef> + <paramdef>double <parameter>c</parameter></paramdef> + <paramdef>double <parameter>d</parameter></paramdef> + <paramdef>double <parameter>e</parameter></paramdef> + <paramdef>double <parameter>f</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Concatenate a matrix to the CTM. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-continue-text"> + <refnamediv> + <refname>PDF_continue_text</refname> + <refpurpose>Outputs text in next line</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_continue_text</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Print text at the next line. The spacing between lines is determined + by the <parameter>leading</parameter> parameter. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-curveto"> + <refnamediv> + <refname>PDF_curveto</refname> + <refpurpose>Draws a curve</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_curveto</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x1</parameter></paramdef> + <paramdef>double <parameter>y1</parameter></paramdef> + <paramdef>double <parameter>x2</parameter></paramdef> + <paramdef>double <parameter>y2</parameter></paramdef> + <paramdef>double <parameter>x3</parameter></paramdef> + <paramdef>double <parameter>y3</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Draw a Bezier curve from the current point, using 3 more control points. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-delete"> + <refnamediv> + <refname>PDF_delete</refname> + <refpurpose>Deletes a PDF object</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_delete</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Delete the PDF object, and free all internal resources. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-end-page"> + <refnamediv> + <refname>PDF_end_page</refname> + <refpurpose>Ends a page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_end_page</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Finish the page. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-endpath"> + <refnamediv> + <refname>PDF_endpath</refname> + <refpurpose>Depreciated: Ends current path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_endpath</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Deprecated, use one of the stroke, fill, or clip functions instead. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-fill"> + <refnamediv> + <refname>PDF_fill</refname> + <refpurpose>Fills current path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_fill_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Fill the interior of the path with the current fill color. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-fill-stroke"> + <refnamediv> + <refname>PDF_fill_stroke</refname> + <refpurpose>Fills and strokes current path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_fill_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Fill and stroke the path with the current fill and stroke color. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-findfont"> + <refnamediv> + <refname>PDF_findfont</refname> + <refpurpose>Prepare font for later use with +<function>PDF_setfont</function>.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_findfont</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>fontname</parameter></paramdef> + <paramdef>string <parameter>encoding^</parameter></paramdef> + <paramdef>int <parameter>embed</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Prepare a font for later use with <function>PDF_setfont</function>. + The metrics will be loaded, and if embed is nonzero, the font file + will be checked, but not yet used. Encoding is one of "builtin", + "macroman", "winansi", "host", or a user-defined encoding name, + or the name of a CMap. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-buffer"> + <refnamediv> + <refname>PDF_get_buffer</refname> + <refpurpose>Fetch the buffer containig the generated PDF data.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>PDF_get_buffer</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Get the contents of the PDF output buffer. The result must be + used by the client before calling any other PDFlib function. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-font"> + <refnamediv> + <refname>PDF_get_font</refname> + <refpurpose>Depreciated font handling</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_get_value</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-fontname"> + <refnamediv> + <refname>PDF_get_fontname</refname> + <refpurpose>Depreciated font handling</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_get_parameter</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-fontsize"> + <refnamediv> + <refname>PDF_get_fontsize</refname> + <refpurpose>Depreciated font handling</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_get_value</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-image-height"> + <refnamediv> + <refname>PDF_get_image_height</refname> + <refpurpose>Returns height of an image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>PDF_get_image_height</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>image</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + The <function>PDF_get_image_height</function> is depreciated, + use <function>PDF_get_value</function> instead. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-image-width"> + <refnamediv> + <refname>PDF_get_image_width</refname> + <refpurpose>Returns width of an image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>PDF_get_image_width</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>image</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + The <function>PDF_get_image_width</function> is depreciated, + use <function>PDF_get_value</function> instead. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-parameter"> + <refnamediv> + <refname>PDF_get_parameter</refname> + <refpurpose>Gets certain parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>PDF_get_parameter</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>key</parameter></paramdef> + <paramdef>double <parameter><optional>modifier</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Get the contents of some PDFlib parameter with string type. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-get-value"> + <refnamediv> + <refname>PDF_get_value</refname> + <refpurpose>Gets certain numerical value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>PDF_get_value</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>key</parameter></paramdef> + <paramdef>double <parameter><optional>modifier</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Get the contents of some PDFlib parameter with float type. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-lineto"> + <refnamediv> + <refname>PDF_lineto</refname> + <refpurpose>Draws a line</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_lineto</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Draw a line from the current point to (<parameter>x</parameter>, + <parameter>y</parameter>). + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-moveto"> + <refnamediv> + <refname>PDF_moveto</refname> + <refpurpose>Sets current point</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_moveto</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current point. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-new"> + <refnamediv> + <refname>PDF_new</refname> + <refpurpose>Creates a new pdf object</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_new</function></funcdef> + <paramdef><parameter></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Create a new PDF object, using default error handling + and memory management. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open"> + <refnamediv> + <refname>pdf_open</refname> + <refpurpose>Depriciated: Opens a new pdf object</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + The <function>PDF_open</function> is depreciated, use + <function>PDF_new</function> plus <function>PDF_open_file</function> + instead. + </para> + <para> + See also <function>PDF_new</function>, + <function>PDF_open_file</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-ccitt"> + <refnamediv> + <refname>PDF_open_CCITT</refname> + <refpurpose>Opens a new image file with raw CCITT data</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + <paramdef>int <parameter>width</parameter></paramdef> + <paramdef>int <parameter>height</parameter></paramdef> + <paramdef>int <parameter>BitReverse</parameter></paramdef> + <paramdef>int <parameter>k</parameter></paramdef> + <paramdef>int <parameter>Blackls1</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Open a raw CCITT image. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-file"> + <refnamediv> + <refname>PDF_open_file</refname> + <refpurpose>Opens a new pdf object</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open_file</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter><optional>filename</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Create a new PDF file using the supplied file name. + If <parameter>filename</parameter> is empty the PDF document + will be generated in memory instead of on file. The result + must be fetched by the client with the + <function>PDF_get_buffer</function> function. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-gif"> + <refnamediv> + <refname>PDF_open_gif</refname> + <refpurpose>Depreciated: Opens a GIF image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_open_image</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-image"> + <refnamediv> + <refname>PDF_open_image</refname> + <refpurpose>Versatile function for images</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open_image</function></funcdef> + <paramdef>int <parameter>PDF-document</parameter></paramdef> + <paramdef>string <parameter>imagetype</parameter></paramdef> + <paramdef>string <parameter>source</parameter></paramdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>long <parameter>length</parameter></paramdef> + <paramdef>int <parameter>width</parameter></paramdef> + <paramdef>int <parameter>height</parameter></paramdef> + <paramdef>int <parameter>components</parameter></paramdef> + <paramdef>int <parameter>bpc</parameter></paramdef> + <paramdef>string <parameter>params</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Use image data from a variety of data sources. Supported types are + "jpeg", "ccitt", "raw". Supported sources are "memory", "fileref", + "url". len is only used for type="raw", params is only + used for type="ccitt". + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-image-file"> + <refnamediv> + <refname>PDF_open_image_file</refname> + <refpurpose>Reads an image from a file</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open_image_file</function></funcdef> + <paramdef>int <parameter>PDF-document</parameter></paramdef> + <paramdef>string <parameter>imagetype</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + <paramdef>string +<parameter><optional>stringparam</optional></parameter></paramdef> + <paramdef>string <parameter><optional>intparam</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Open an image file. Supported types are "jpeg", "tiff", "gif", + and "png". <parameter>stringparam</parameter> is either + "", "mask", "masked", or "page". + <parameter>intparam</parameter>is either 0, the image id + of the applied mask, or the page. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-jpeg"> + <refnamediv> + <refname>PDF_open_jpeg</refname> + <refpurpose>Depreciated: Opens a JPEG image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_open_image</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-png"> + <refnamediv> + <refname>PDF_open_png</refname> + <refpurpose> + Depreciated: Opens a PNG image + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_open_image</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-tiff"> + <refnamediv> + <refname>PDF_open_tiff</refname> + <refpurpose>Depreciated: Opens a TIFF image</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open_tiff</function></funcdef> + <paramdef>int <parameter>PDF-document</parameter></paramdef> + <paramdef>string <parameter>filename</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_open_image</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-place-image"> + <refnamediv> + <refname>PDF_place_image</refname> + <refpurpose>Places an image on the page</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_place_image</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>image</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>double <parameter>scale</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Place an image with the lower left corner at (<parameter>x</parameter>, + <parameter>y</parameter>), and scale it. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-rect"> + <refnamediv> + <refname>PDF_rect</refname> + <refpurpose>Draws a rectangle</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_rect</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>double <parameter>width</parameter></paramdef> + <paramdef>double <parameter>height</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Draw a rectangle at lower left (x, y) with width and height. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-restore"> + <refnamediv> + <refname>PDF_restore</refname> + <refpurpose>Restores formerly saved environment</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_restore</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Restore the most recently saved graphics state. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-rotate"> + <refnamediv> + <refname>PDF_rotate</refname> + <refpurpose>Sets rotation</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_rotate</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>phi</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Rotate the coordinate system by phi degrees. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-save"> + <refnamediv> + <refname>PDF_save</refname> + <refpurpose>Saves the current environment</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_save</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Save the current graphics state. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-scale"> + <refnamediv> + <refname>PDF_scale</refname> + <refpurpose>Sets scaling</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_scale</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x-scale</parameter></paramdef> + <paramdef>double <parameter>y-scale</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Scale the coordinate system. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setdash"> + <refnamediv> + <refname>PDF_setdash</refname> + <refpurpose>Sets dash pattern</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setdash</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>w</parameter></paramdef> + <paramdef>double <parameter>b</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current dash pattern to b black and w white units. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setflat"> + <refnamediv> + <refname>PDF_setflat</refname> + <refpurpose>Sets flatness</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setflat</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>flatness</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the flatness to a value between 0 and 100 inclusive. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setfont"> + <refnamediv> + <refname>PDF_setfont</refname> + <refpurpose>Set the current font</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setfont</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>font</parameter></paramdef> + <paramdef>double <parameter>size</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current font in the given size, using a + <parameter>font</parameter> handle returned by + <function>PDF_findfont</function> + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setgray"> + <refnamediv> + <refname>PDF_setgray</refname> + <refpurpose>Sets drawing and filling color to gray value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setgray</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>gray</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current fill and stroke color. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setgray-fill"> + <refnamediv> + <refname>PDF_setgray_fill</refname> + <refpurpose>Sets filling color to gray value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setgray_fill</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>gray</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current fill color to a gray value between 0 and 1 inclusive. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setgray-stroke"> + <refnamediv> + <refname>PDF_setgray_stroke</refname> + <refpurpose>Sets drawing color to gray value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setgray_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>gray</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current stroke color to a gray value between 0 and 1 inclusive + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setlinecap"> + <refnamediv> + <refname>PDF_setlinecap</refname> + <refpurpose>Sets linecap parameter</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setlinecap</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>linecap</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the <parameter>linecap</parameter> parameter to a value between 0 and 2 +inclusive. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setlinejoin"> + <refnamediv> + <refname>PDF_setlinejoin</refname> + <refpurpose>Sets linejoin parameter</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setlinejoin</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>long <parameter>linejoin</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the line join parameter to a value between 0 and 2 inclusive. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setlinewidth"> + <refnamediv> + <refname>PDF_setlinewidth</refname> + <refpurpose>Sets line width</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setlinewidth</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>width</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current linewidth to width. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setmiterlimit"> + <refnamediv> + <refname>PDF_setmiterlimit</refname> + <refpurpose>Sets miter limit</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setmiterlimit</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>miter</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the miter limit to a value greater than or equal to 1. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setoplydash"> + <refnamediv> + <refname>PDF_setoplydash</refname> + <refpurpose>Sets complicated dash pattern</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setoplydash</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double *<parameter>dasharray</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set a more complicated dash pattern defined by an array. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setrgbcolor"> + <refnamediv> + <refname>PDF_setrgbcolor</refname> + <refpurpose>Sets drawing and filling color to rgb color value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setrgbcolor</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>red value</parameter></paramdef> + <paramdef>double <parameter>green value</parameter></paramdef> + <paramdef>double <parameter>blue value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current fill and stroke color to the supplied RGB values. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setrgbcolor-fill"> + <refnamediv> + <refname>PDF_setrgbcolor_fill</refname> + <refpurpose>Sets filling color to rgb color value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setrgbcolor_fill</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>red value</parameter></paramdef> + <paramdef>double <parameter>green value</parameter></paramdef> + <paramdef>double <parameter>blue value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current fill color to the supplied RGB values. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-setrgbcolor-stroke"> + <refnamediv> + <refname>PDF_setrgbcolor_stroke</refname> + <refpurpose>Sets drawing color to rgb color value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_setrgbcolor_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>red value</parameter></paramdef> + <paramdef>double <parameter>green value</parameter></paramdef> + <paramdef>double <parameter>blue value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the current stroke color to the supplied RGB values. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-border-color"> + <refnamediv> + <refname>PDF_set_border_color</refname> + <refpurpose>Sets color of border around links and annotations</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_border_color</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>red</parameter></paramdef> + <paramdef>double <parameter>green</parameter></paramdef> + <paramdef>double <parameter>blue</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the border color for all kinds of annotations. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-border-dash"> + <refnamediv> + <refname>PDF_set_border_dash</refname> + <refpurpose>Sets dash style of border around links and annotations</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_border_dash</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>black</parameter></paramdef> + <paramdef>double <parameter>white</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the border dash style for all kinds of annotations. + See <function>PDF_setdash</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-border-style"> + <refnamediv> + <refname>PDF_set_border_style</refname> + <refpurpose>Sets style of border around links and annotations</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_border_style</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>style</parameter></paramdef> + <paramdef>double <parameter>width</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the border style for all kinds of annotations. + <parameter>style</parameter> is "solid" or "dashed". + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-char-spacing"> + <refnamediv> + <refname>PDF_set_char_spacing</refname> + <refpurpose>Depreciated: Sets character spacing</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-duration"> + <refnamediv> + <refname>pdf_set_duration</refname> + <refpurpose>Depriciated: Sets duration between pages</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_set_value</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-font"> + <refnamediv> + <refname>PDF_set_font</refname> + <refpurpose>Depreciated: Selects a font face and size</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. You should use <function>PDF_findfont</function> plus + <function>PDF_setfont</function> instead. + </para> + <para> + See <function>PDF_findfont</function>, + <function>PDF_setfont</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-horiz-scaling"> + <refnamediv> + <refname>PDF_set_horiz_scaling</refname> + <refpurpose>Sets horizontal scaling of text</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_horiz_scaling</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>scale</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-info"> + <refnamediv> + <refname>PDF_set_info</refname> + <refpurpose>Fills a field of the document information</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_info</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>key</parameter></paramdef> + <paramdef>string <parameter>value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Fill document information field key with value. + <parameter>key</parameter> is one of "Subject", "Title", "Creator", + "Author", "Keywords", or a user-defined key. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-leading"> + <refnamediv> + <refname>PDF_set_leading</refname> + <refpurpose>Depreciated: Sets distance between text lines</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-parameter"> + <refnamediv> + <refname>PDF_set_parameter</refname> + <refpurpose>Sets certain parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_parameter</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>key</parameter></paramdef> + <paramdef>string <parameter>value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set some PDFlib parameter with string type. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-text-pos"> + <refnamediv> + <refname>PDF_set_text_pos</refname> + <refpurpose>Sets text position</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_text_pos</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the text output position. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-text-rendering"> + <refnamediv> + <refname>PDF_set_text_rendering</refname> + <refpurpose>Depreciated: Determines how text is rendered</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-text-rise"> + <refnamediv> + <refname>pdf_set_text_rise</refname> + <refpurpose>Depriciated: Sets the text rise</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-transition"> + <refnamediv> + <refname>pdf_set_text_matrix</refname> + <refpurpose>Depriciated: Sets the text matrix</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + See <function>PDF_set_paramter</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-value"> + <refnamediv> + <refname>PDF_set_value</refname> + <refpurpose>Sets certain numerical value</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_set_value</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>key</parameter></paramdef> + <paramdef>double <parameter>value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Set the value of some PDFlib parameter with float type. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-set-word-spacing"> + <refnamediv> + <refname>pdf_set_word_spacing</refname> + <refpurpose>Depriciated: Sets spacing between words</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + Depreciated. + </para> + <para> + See also <function>PDF_set_value</function>, + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-show"> + <refnamediv> + <refname>PDF_show</refname> + <refpurpose>Output text at current position</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_show</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Print text in the current font and size at the current position. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-show-boxed"> + <refnamediv> + <refname>PDF_show_boxed</refname> + <refpurpose>Output text in a box</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_show_boxed</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>double <parameter>left</parameter></paramdef> + <paramdef>double <parameter>top</parameter></paramdef> + <paramdef>double <parameter>width</parameter></paramdef> + <paramdef>double <parameter>height</parameter></paramdef> + <paramdef>string <parameter>hmode</parameter></paramdef> + <paramdef>string <parameter><optional>feature</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Format text in the current font and size into the supplied text box + according to the requested formatting mode, which must be one of + "left", "right", "center", "justify", or "fulljustify". + If width and height are 0, only a single line is placed at the point + (left, top) in the requested mode. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-show-xy"> + <refnamediv> + <refname>PDF_show_xy</refname> + <refpurpose>Output text at given position</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_show_xy</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>double <parameter>y</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Print text in the current font at (x, y). + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-skew"> + <refnamediv> + <refname>PDF_skew</refname> + <refpurpose>Skews the coordinate system</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_skew</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>alpha</parameter></paramdef> + <paramdef>double <parameter>beta</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Skew the coordinate system in x and y direction by alpha and + beta degrees. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-stringwidth"> + <refnamediv> + <refname>PDF_stringwidth</refname> + <refpurpose>Returns width of text using current font</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>PDF_stringwidth</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>string <parameter>text</parameter></paramdef> + <paramdef>string <parameter><optional>text</optional></parameter></paramdef> + <paramdef>string <parameter><optional>text</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Return the width of text in an arbitrary font. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-stroke"> + <refnamediv> + <refname>PDF_stroke</refname> + <refpurpose>Draws line along path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_stroke</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Stroke the path with the current color and line width, and clear it. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-translate"> + <refnamediv> + <refname>PDF_translate</refname> + <refpurpose>Sets origin of coordinate system</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>PDF_translate</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>double <parameter>tx</parameter></paramdef> + <paramdef>double <parameter>ty</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Translate the origin of the coordinate system. + </para> + </refsect1> + </refentry> + + <refentry id="function.pdf-open-memory-image"> + <refnamediv> + <refname>PDF_open_memory_image</refname> + <refpurpose>Opens an image created with PHP's image functions</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>PDF_open_memory_image</function></funcdef> + <paramdef>int <parameter>pdf object</parameter></paramdef> + <paramdef>int <parameter>image</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + The <function>PDF_open_memory_image</function> function takes + an image created with the PHP's image functions and makes it available + for the pdf object. The function returns a pdf + image identifier. + + <example> + <title>Including a memory image</title> + <programlisting> +<?php +$im = ImageCreate(100, 100); +$col = ImageColorAllocate($im, 80, 45, 190); +ImageFill($im, 10, 10, $col); +$pim = PDF_open_memory_image($pdf, $im); +ImageDestroy($im); +PDF_place_image($pdf, $pim, 100, 100, 1); +PDF_close_image($pdf, $pim); +?> + </programlisting> + </example></para> + + <para> + See also <function>PDF_close_image</function>, + <function>PDF_place_image</function>.</para> + </refsect1> + </refentry> + + </reference> + +<!-- 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 +sgml-parent-document:nil +sgml-default-dtd-file:"../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +-->