cynic Wed Jan 24 08:32:24 2001 EDT Added files: /phpdoc/cs/functions pdf.xml Log: started translation.
Index: phpdoc/cs/functions/pdf.xml +++ phpdoc/cs/functions/pdf.xml <reference id="ref.pdf"> <title>PDF funkce</title> <titleabbrev>PDF</titleabbrev> <partintro> <sect1 id="pdf.intro"> <title>Introduction</title> <simpara> Pokud máte PDF knihovnu od Thomase Merze (dostupná z <ulink url="&url.pdf;">&url.pdf;</ulink>), můžete používat PDF funkce na tvorbu PDF souborů; ke kompilaci budete potřebovat také <ulink url="&url.jpeg;">JPEG knihovnu</ulink> a <ulink url="&url.tiff;">TIFF knihovnu</ulink>. Tyto dvě knihovny poměrně často dělají potíže při konfiguraci PHP. Při řešení případných problémů se řiďte chybovými zprávami configure skriptu. </simpara> <simpara> Věnujte prosím pozornost výborné dokumentaci pdflib, která je součástí distribuce zdrojového kódu. Poskytuje velmi dobrý přehled schopností pdflib. Většina funkcí pdflib a příslušného PHP modulu má stejné jméno. Argumenty jsou také identické. Pokud chcete tento modul využívat opravdu efektivně, měli byste chápat také některé z konceptů PDF nebo Postscriptu. Všechny rozměry a koordináty se udávají v Postscriptových bodech. Obecně je 72 PostScriptových bodů na palec, ale závisí to na výstupním rozlyšení. </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: -->