danbeck Thu May 17 15:40:32 2001 EDT
Modified files:
/phpdoc/en/functions pdf.xml
Log:
clarified analog clock description and reference to CLibPDF, fixed return type of
PDF_findfont, put PDF_open_memory_image in aphanumeric order and converted some of the
function names from pdf_ to PDF_
Index: phpdoc/en/functions/pdf.xml
diff -u phpdoc/en/functions/pdf.xml:1.47 phpdoc/en/functions/pdf.xml:1.48
--- phpdoc/en/functions/pdf.xml:1.47 Thu May 17 14:49:51 2001
+++ phpdoc/en/functions/pdf.xml Thu May 17 15:40:32 2001
@@ -293,12 +293,11 @@
</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>:
+ creates a page with an analog clock. Here we use the in memory
+ creation feature of PDFlib to alleviate the need to use temporary
+ files. The example, converted to PHP from the PDFlib example, is
+ as follows: (The same example is available in the <link
+ linkend="ref.cpdf">CLibPDF</link> documentation.)
</para>
<para>
<example>
@@ -536,7 +535,7 @@
<refentry id="function.pdf-add-outline">
<refnamediv>
- <refname>pdf_add_outline</refname>
+ <refname>PDF_add_outline</refname>
<refpurpose>Deprecated: Adds bookmark for current page</refpurpose>
</refnamediv>
<refsect1>
@@ -1151,7 +1150,7 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>void <function>PDF_findfont</function></funcdef>
+ <funcdef>int <function>PDF_findfont</function></funcdef>
<paramdef>int <parameter>pdf object</parameter></paramdef>
<paramdef>string <parameter>fontname</parameter></paramdef>
<paramdef>string <parameter>encoding^</parameter></paramdef>
@@ -1165,6 +1164,25 @@
"macroman", "winansi", "host", or a user-defined encoding name,
or the name of a CMap.
</para>
+ <para>
+ <function>PDF_findfont</function> returns a font handle or false
+ on error.
+ </para>
+ <para>
+ <example>
+ <title><function>PDF_findfont</function> example</title>
+ <programlisting role="php">
+<php
+
+$font = pdf_findfont($pdf, "Times New Roman", "winansi", 1);
+if ($font) {
+ pdf_setfont($pdf, $font, 10);
+}
+
+?>
+ </programlisting>
+ </example>
+ </para>
</refsect1>
</refentry>
@@ -1470,7 +1488,7 @@
<refentry id="function.pdf-open">
<refnamediv>
- <refname>pdf_open</refname>
+ <refname>PDF_open</refname>
<refpurpose>Deprecated: Open a new pdf object</refpurpose>
</refnamediv>
<refsect1>
@@ -1656,6 +1674,47 @@
</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>
+
+
<refentry id="function.pdf-open-pdi">
<refnamediv>
<refname>PDF_open_pdi</refname>
@@ -1963,28 +2022,31 @@
</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-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>
+ <para>
+ See Also: <function>PDF_findfont</function>.
+ </para>
+ </refsect1>
+ </refentry>
<refentry id="function.pdf-setgray">
<refnamediv>
@@ -2351,7 +2413,7 @@
<refentry id="function.pdf-set-duration">
<refnamediv>
- <refname>pdf_set_duration</refname>
+ <refname>PDF_set_duration</refname>
<refpurpose>Deprecated: Sets duration between pages</refpurpose>
</refnamediv>
<refsect1>
@@ -2505,7 +2567,7 @@
<refentry id="function.pdf-set-text-rise">
<refnamediv>
- <refname>pdf_set_text_rise</refname>
+ <refname>PDF_set_text_rise</refname>
<refpurpose>Deprecated: Sets the text rise</refpurpose>
</refnamediv>
<refsect1>
@@ -2521,7 +2583,7 @@
<refentry id="function.pdf-set-transition">
<refnamediv>
- <refname>pdf_set_text_matrix</refname>
+ <refname>PDF_set_text_matrix</refname>
<refpurpose>Deprecated: Sets the text matrix</refpurpose>
</refnamediv>
<refsect1>
@@ -2555,7 +2617,7 @@
<refentry id="function.pdf-set-word-spacing">
<refnamediv>
- <refname>pdf_set_word_spacing</refname>
+ <refname>PDF_set_word_spacing</refname>
<refpurpose>Depriciated: Sets spacing between words</refpurpose>
</refnamediv>
<refsect1>
@@ -2722,47 +2784,6 @@
<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>