started re-indenting, re-formatting and some minor corrections

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@31472 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Martin Samesch 2000-08-29 10:41:32 +00:00
parent 76aee4339d
commit 27b6d5fb30

View file

@ -3,7 +3,6 @@
<titleabbrev>ClibPDF</titleabbrev>
<partintro>
<simpara>
ClibPDF lets you create PDF documents with PHP. It is available at
<ulink url="&url.fastio;">FastIO</ulink> but it isn't free
@ -16,48 +15,52 @@
benchmark (the pdfclock.c example from pdflib 2.0 turned into a php
script) actually shows no difference in speed at all. The file size
is also similar if compression is turned off. So, try them both
and see which one does the job for you.</simpara>
and see which one does the job for you.
</simpara>
<simpara>
This documentation should be read alongside the ClibPDF manual since it
explains the library in much greater detail.
</simpara>
</simpara>
<simpara>
Many functions in the native ClibPDF and the PHP module, as
well as in pdflib, have the same name. All functions except for
<function>cpdf_open</function> take the handle for the document as
their first parameter.
</simpara>
<simpara>
Currently this handle is not used internally since ClibPDF does
not support the creation of several PDF documents at the same time.
Actually, you should not even try it, the results are unpredictable. I
can't oversee what the consequences in a multi threaded environment
are. According to the author of ClibPDF this will change in one of
the next releases (current version when this was written is 1.10).
If you need this functionality use the pdflib module.</simpara>
<note><simpara>
The function <function>cpdf_set_font</function> has changed since PHP3
to support asian fonts. The encoding parameter is no longer an integer
but a string.</simpara></note>
If you need this functionality use the pdflib module.
</simpara>
<note>
<simpara>
The function <function>cpdf_set_font</function> has changed since PHP3
to support asian fonts. The encoding parameter is no longer an integer
but a string.
</simpara>
</note>
<simpara>
One big advantage of ClibPDF over pdflib is the possibility to create
the pdf document completely in memory without using temporary files.
It also provides the ability to pass coordinates in a predefined
unit length. This is a handy feature but can be simulated with
<function>pdf_translate</function>.</simpara>
<function>pdf_translate</function>.
</simpara>
<simpara>
Most of the functions are fairly easy to use. The most difficult part
is probably creating a very simple PDF document at all. The following
example should help you get started. It creates a document
with one page. The page contains the text "Times-Roman" in an
outlined 30pt font. The text is underlined.</simpara>
<example>
<title>Simple ClibPDF Example</title>
<programlisting>
outlined 30pt font. The text is underlined.
</simpara>
<example>
<title>Simple ClibPDF Example</title>
<programlisting>
&lt;?php
$cpdf = cpdf_open(0);
cpdf_page_init($cpdf, 1, 0, 595, 842);
@ -74,18 +77,17 @@ cpdf_finalize($cpdf);
Header("Content-type: application/pdf");
cpdf_output_buffer($cpdf);
cpdf_close($cpdf);
?>
?&gt;
</programlisting>
</example>
<simpara>
The pdflib distribution contains a more complex example which creates a
series of pages with an analog clock. Here is that example converted
into PHP using the ClibPDF extension:</simpara>
<example>
<title>pdfclock example from pdflib 2.0 distribution</title>
<programlisting>
</example>
<simpara>
The pdflib distribution contains a more complex example which creates a
series of pages with an analog clock. Here is that example converted
into PHP using the ClibPDF extension:
</simpara>
<example>
<title>pdfclock example from pdflib 2.0 distribution</title>
<programlisting>
&lt;?php
$radius = 200;
$margin = 20;
@ -172,9 +174,9 @@ cpdf_finalize($pdf);
Header("Content-type: application/pdf");
cpdf_output_buffer($pdf);
cpdf_close($pdf);
?>
?&gt;
</programlisting>
</example>
</example>
</partintro>
<refentry id="function.cpdf-global-set-document-limits">
@ -186,7 +188,9 @@ cpdf_close($pdf);
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>cpdf_global_set_document_limits</function></funcdef>
<funcdef>
void <function>cpdf_global_set_document_limits</function>
</funcdef>
<paramdef>int <parameter>maxpages</parameter></paramdef>
<paramdef>int <parameter>maxfonts</parameter></paramdef>
<paramdef>int <parameter>maximages</parameter></paramdef>
@ -199,11 +203,10 @@ cpdf_close($pdf);
several document limits. This function has to be called before
<function>cpdf_open</function> to take effect. It sets the limits
for any document open afterwards.
</para>
</para>
<para>
See also <function>cpdf_open</function>.</para>
See also <function>cpdf_open</function>.
</para>
</refsect1>
</refentry>
@ -222,13 +225,13 @@ cpdf_close($pdf);
</funcsynopsis>
<para>
The <function>cpdf_set_creator</function> function sets the
creator of a pdf document.</para>
creator of a pdf document.
</para>
<para>
See also <function>cpdf_set_subject</function>,
<function>cpdf_set_title</function>,
<function>cpdf_set_keywords</function>.</para>
<function>cpdf_set_keywords</function>.
</para>
</refsect1>
</refentry>
@ -247,13 +250,13 @@ cpdf_close($pdf);
</funcsynopsis>
<para>
The <function>cpdf_set_title</function> function sets the
title of a pdf document.</para>
title of a pdf document.
</para>
<para>
See also <function>cpdf_set_subject</function>,
<function>cpdf_set_creator</function>,
<function>cpdf_set_keywords</function>.</para>
<function>cpdf_set_keywords</function>.
</para>
</refsect1>
</refentry>
@ -272,13 +275,13 @@ cpdf_close($pdf);
</funcsynopsis>
<para>
The <function>cpdf_set_subject</function> function sets the
subject of a pdf document.</para>
subject of a pdf document.
</para>
<para>
See also <function>cpdf_set_title</function>,
<function>cpdf_set_creator</function>,
<function>cpdf_set_keywords</function>.</para>
<function>cpdf_set_keywords</function>.
</para>
</refsect1>
</refentry>
@ -297,13 +300,13 @@ cpdf_close($pdf);
</funcsynopsis>
<para>
The <function>cpdf_set_keywords</function> function sets the
keywords of a pdf document.</para>
keywords of a pdf document.
</para>
<para>
See also <function>cpdf_set_title</function>,
<function>cpdf_set_creator</function>,
<function>cpdf_set_subject</function>.</para>
<function>cpdf_set_subject</function>.
</para>
</refsect1>
</refentry>
@ -318,7 +321,9 @@ cpdf_close($pdf);
<funcprototype>
<funcdef>int <function>cpdf_open</function></funcdef>
<paramdef>int <parameter>compression</parameter></paramdef>
<paramdef>string <parameter>filename</parameter></paramdef>
<paramdef>
string <parameter><optional>filename</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
@ -329,23 +334,25 @@ cpdf_close($pdf);
is created in memory and can either be written into a file with
the <function>cpdf_save_to_file</function> or written to standard
output with <function>cpdf_output_buffer</function>.
<note><simpara>
<note>
<simpara>
The return value will be needed in futher versions of ClibPDF as the
first parameter in all other functions which are writing to the pdf
document.
</simpara><simpara>
</simpara>
<simpara>
The ClibPDF library takes the filename "-" as a synonym for stdout.
If PHP is compiled as an apache module this will not work because the
way ClibPDF outputs to stdout does not work with apache. You can solve
this problem by skipping the filename and using
<function>cpdf_output_buffer</function> to output the pdf document.
</simpara></note></para>
</simpara>
</note>
</para>
<para>
See also <function>cpdf_close</function>,
<function>cpdf_output_buffer</function>.</para>
<function>cpdf_output_buffer</function>.
</para>
</refsect1>
</refentry>
@ -366,11 +373,11 @@ cpdf_close($pdf);
The <function>cpdf_close</function> function closes the pdf document.
This should be the last function even after
<function>cpdf_finalize</function>, <function>cpdf_output_buffer</function>
and <function>cpdf_save_to_file</function>.</para>
and <function>cpdf_save_to_file</function>.
</para>
<para>
See also <function>cpdf_open</function>.</para>
See also <function>cpdf_open</function>.
</para>
</refsect1>
</refentry>
@ -389,7 +396,9 @@ cpdf_close($pdf);
<paramdef>int <parameter>orientation</parameter></paramdef>
<paramdef>double <parameter>height</parameter></paramdef>
<paramdef>double <parameter>width</parameter></paramdef>
<paramdef>double <parameter>unit</parameter></paramdef>
<paramdef>
double <parameter><optional>unit</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
@ -399,14 +408,14 @@ cpdf_close($pdf);
<parameter>page number</parameter> and orientation
<parameter>orientation</parameter>. <parameter>orientation</parameter>
can be 0 for portrait and 1 for landscape. The last optional parameter
<parameter>unit</parameter> sets the unit for the koordinate system.
<parameter>unit</parameter> sets the unit for the coordinate system.
The value should be the number of postscript points per unit. Since
one inch is equal to 72 points, a value of 72 would set the unit
to one inch. The default is also 72.</para>
to one inch. The default is also 72.
</para>
<para>
See also <function>cpdf_set_current_page</function>.</para>
See also <function>cpdf_set_current_page</function>.
</para>
</refsect1>
</refentry>
@ -427,12 +436,14 @@ cpdf_close($pdf);
<para>
The <function>cpdf_finalize_page</function> function ends the page
with page number <parameter>page number</parameter>.
This function is only for saving memory. A finalized page takes
less memory but cannot be modified anymore.</para>
</para>
<para>
See also <function>cpdf_page_init</function>.</para>
This function is only for saving memory. A finalized page takes
less memory but cannot be modified anymore.
</para>
<para>
See also <function>cpdf_page_init</function>.
</para>
</refsect1>
</refentry>
@ -451,11 +462,11 @@ cpdf_close($pdf);
</funcsynopsis>
<para>
The <function>cpdf_finalize</function> function ends the document.
You still have to call <function>cpdf_close</function>.</para>
You still have to call <function>cpdf_close</function>
</para>
<para>
See also <function>cpdf_close</function>.</para>
See also <function>cpdf_close</function>.
</para>
</refsect1>
</refentry>
@ -476,11 +487,11 @@ cpdf_close($pdf);
The <function>cpdf_output_buffer</function> function outputs
the pdf document to stdout. The document has to be created in memory which
is the case if <function>cpdf_open</function> has been called with
no filename parameter.</para>
no filename parameter.
</para>
<para>
See also <function>cpdf_open</function>.</para>
See also <function>cpdf_open</function>.
</para>
</refsect1>
</refentry>
@ -501,13 +512,15 @@ cpdf_close($pdf);
<para>
The <function>cpdf_save_to_file</function> function outputs
the pdf document into a file if it has been created in memory.
</para>
<para>
This function is not needed if the pdf document has been open
by specifying a filename as a parameter of <function>cpdf_open</function>.</para>
by specifying a filename as a parameter of <function>cpdf_open</function>.
</para>
<para>
See also <function>cpdf_output_buffer</function>,
<function>cpdf_open</function>.</para>
<function>cpdf_open</function>.
</para>
</refsect1>
</refentry>
@ -528,11 +541,11 @@ cpdf_close($pdf);
<para>
The <function>cpdf_set_current_page</function> function set the page
on which all operations are performed. One can switch between pages
until a page is finished with <function>cpdf_finalize_page</function>.</para>
until a page is finished with <function>cpdf_finalize_page</function>.
</para>
<para>
See also <function>cpdf_finalize_page</function>.</para>
See also <function>cpdf_finalize_page</function>.
</para>
</refsect1>
</refentry>
@ -552,19 +565,21 @@ cpdf_close($pdf);
<para>
The <function>cpdf_begin_text</function> function starts a text
section. It must be ended with <function>cpdf_end_text</function>.
<example>
<title>Text output</title>
<programlisting>
&lt;?php cpdf_begin_text($pdf);
&lt;?php
cpdf_begin_text($pdf);
cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding");
cpdf_text($pdf, 100, 100, "Some text");
cpdf_end_text($pdf) ?>
</programlisting></example></para>
cpdf_end_text($pdf)
?&gt;
</programlisting>
</example>
</para>
<para>
See also <function>cpdf_end_text</function>.</para>
See also <function>cpdf_end_text</function>.
</para>
</refsect1>
</refentry>
@ -584,19 +599,21 @@ cpdf_end_text($pdf) ?>
<para>
The <function>cpdf_end_text</function> function ends a text
section which was started with <function>cpdf_begin_text</function>.
<example>
<title>Text output</title>
<programlisting>
&lt;?php cpdf_begin_text($pdf);
&lt;?php
cpdf_begin_text($pdf);
cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding");
cpdf_text($pdf, 100, 100, "Some text");
cpdf_end_text($pdf) ?>
</programlisting></example></para>
cpdf_end_text($pdf)
?&gt;
</programlisting>
</example>
</para>
<para>
See also <function>cpdf_begin_text</function>.</para>
See also <function>cpdf_begin_text</function>.
</para>
</refsect1>
</refentry>
@ -616,13 +633,13 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_show</function> function outputs the
string in <parameter>text</parameter> at the current position.</para>
string in <parameter>text</parameter> at the current position.
</para>
<para>
See also <function>cpdf_text</function>,
<function>cpdf_begin_text</function>,
<function>cpdf_end_text</function>.</para>
<function>cpdf_end_text</function>.
</para>
</refsect1>
</refentry>
@ -638,26 +655,31 @@ cpdf_end_text($pdf) ?>
<funcdef>void <function>cpdf_show_xy</function></funcdef>
<paramdef>int <parameter>pdf document</parameter></paramdef>
<paramdef>string <parameter>text</parameter></paramdef>
<paramdef>double <parameter>x-koor</parameter></paramdef>
<paramdef>double <parameter>y-koor</parameter></paramdef>
<paramdef>int <parameter>mode</parameter></paramdef>
<paramdef>double <parameter>x-coor</parameter></paramdef>
<paramdef>double <parameter>y-coor</parameter></paramdef>
<paramdef>int <parameter><optional>mode</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>cpdf_show_xy</function> function outputs the
string <parameter>text</parameter> at position with
coordinates (<parameter>x-koor</parameter>, <parameter>y-koor</parameter>).
The last optional parameter determines the unit length. If is 0 or omitted
the default unit as specified for the page is used. Otherwise the koodinates
are measured in postscript points disregarding the current unit.
<note>
<simpara>The function <function>cpdf_show_xy</function> is identical
to <function>cpdf_text</function> without the optional parameters.</simpara></note></para>
string <parameter>text</parameter> at position with coordinates
(<parameter>x-coor</parameter>, <parameter>y-coor</parameter>).
</para>
<para>
See also <function>cpdf_text</function>.</para>
The last optional parameter determines the unit length. If is 0 or omitted
the default unit as specified for the page is used. Otherwise the
coordinates are measured in postscript points disregarding the current
unit.
<note>
<simpara>
The function <function>cpdf_show_xy</function> is identical to
<function>cpdf_text</function> without the optional parameters.
</simpara>
</note>
</para>
<para>
See also <function>cpdf_text</function>.
</para>
</refsect1>
</refentry>
@ -673,29 +695,36 @@ cpdf_end_text($pdf) ?>
<funcdef>void <function>cpdf_text</function></funcdef>
<paramdef>int <parameter>pdf document</parameter></paramdef>
<paramdef>string <parameter>text</parameter></paramdef>
<paramdef>double <parameter>x-koor</parameter></paramdef>
<paramdef>double <parameter>y-koor</parameter></paramdef>
<paramdef>int <parameter>mode</parameter></paramdef>
<paramdef>double <parameter>orientation</parameter></paramdef>
<paramdef>int <parameter>alignmode</parameter></paramdef>
<paramdef>double <parameter>x-coor</parameter></paramdef>
<paramdef>double <parameter>y-coor</parameter></paramdef>
<paramdef>int <parameter><optional>mode</optional></parameter></paramdef>
<paramdef>
double <parameter><optional>orientation</optional></parameter>
</paramdef>
<paramdef>
int <parameter><optional>alignmode</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>cpdf_text</function> function outputs the
string <parameter>text</parameter> at position with
coordinates (<parameter>x-koor</parameter>, <parameter>y-koor</parameter>).
The <function>cpdf_text</function> function outputs the string
<parameter>text</parameter> at position with coordinates
(<parameter>x-coor</parameter>, <parameter>y-coor</parameter>).
</para>
<para
The optional parameter determines the unit length. If is 0 or omitted
the default unit as specified for the page is used.
Otherwise the koodinates
are measured in postscript points disregarding the current unit.
The optional parameter <parameter>orientation</parameter> is the rotation
the default unit as specified for the page is used. Otherwise the
coordinates are measured in postscript points disregarding the current
unit. The optional parameter <parameter>orientation</parameter> is the rotation
of the text in degree. The optional parameter
<parameter>alignmode</parameter> determines how the text is align.
See the ClibPDF documentation for possible values.</para>
</para>
<para>
See also <function>cpdf_show_xy</function>.</para>
See the ClibPDF documentation for possible values.
</para>
<para>
See also <function>cpdf_show_xy</function>.
</para>
</refsect1>
</refentry>
@ -719,13 +748,16 @@ cpdf_end_text($pdf) ?>
The <function>cpdf_set_font</function> function sets the the
current font face, font size and encoding. Currently only
the standard postscript fonts are supported.
The last parameter
<parameter>encoding</parameter> can take the following values:
"MacRomanEncoding", "MacExpertEncoding", "WinAnsiEncoding",
and "NULL". "NULL" stands for the font's built-in encoding.
See the ClibPDF Manual for more information, especially how
to support asian fonts.</para>
</para>
<para>
The last parameter <parameter>encoding</parameter> can take the following
values: "MacRomanEncoding", "MacExpertEncoding", "WinAnsiEncoding", and
"NULL". "NULL" stands for the font's built-in encoding.
</para>
<para>
See the ClibPDF Manual for more information, especially how to support
asian fonts.
</para>
</refsect1>
</refentry>
@ -746,11 +778,11 @@ cpdf_end_text($pdf) ?>
<para>
The <function>cpdf_set_leading</function> function sets the distance
between text lines. This will be used if text is output by
<function>cpdf_continue_text</function>.</para>
<function>cpdf_continue_text</function>.
</para>
<para>
See also <function>cpdf_continue_text</function>.</para>
See also <function>cpdf_continue_text</function>.
</para>
</refsect1>
</refentry>
@ -770,11 +802,15 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_set_text_rendering</function> function determines
how text is rendered. The possible values for <parameter>mode</parameter>
how text is rendered.
</para>
<para>
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>
it to cliping path, 7=add it to clipping path.
</para>
</refsect1>
</refentry>
@ -794,7 +830,8 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_set_horiz_scaling</function> function sets the
horizontal scaling to <parameter>scale</parameter> percent.</para>
horizontal scaling to <parameter>scale</parameter> percent.
</para>
</refsect1>
</refentry>
@ -814,7 +851,8 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_set_text_rise</function> function sets the
text rising to <parameter>value</parameter> units.</para>
text rising to <parameter>value</parameter> units.
</para>
</refsect1>
</refentry>
@ -835,7 +873,8 @@ cpdf_end_text($pdf) ?>
<para>
The <function>cpdf_set_text_matrix</function> function sets
a matrix which describes a transformation applied on the current
text font.</para>
text font.
</para>
</refsect1>
</refentry>
@ -850,25 +889,26 @@ cpdf_end_text($pdf) ?>
<funcprototype>
<funcdef>void <function>cpdf_set_text_pos</function></funcdef>
<paramdef>int <parameter>pdf document</parameter></paramdef>
<paramdef>double <parameter>x-koor</parameter></paramdef>
<paramdef>double <parameter>y-koor</parameter></paramdef>
<paramdef>int <parameter>mode</parameter></paramdef>
<paramdef>double <parameter>x-coor</parameter></paramdef>
<paramdef>double <parameter>y-coor</parameter></paramdef>
<paramdef>int <parameter><optional>mode</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>cpdf_set_text_pos</function> function sets the
position of text for the next <function>cpdf_show</function>
function call.</para>
function call.
</para>
<para>
The last optional parameter <parameter>mode</parameter> determines
the unit length. If is 0 or omitted the default unit as specified
for the page is used. Otherwise the koodinates
are measured in postscript points disregarding the current unit.</para>
for the page is used. Otherwise the coodinates are measured in
postscript points disregarding the current unit.
</para>
<para>
See also <function>cpdf_show</function>,
<function>cpdf_text</function>.</para>
<function>cpdf_text</function>.
</para>
</refsect1>
</refentry>
@ -888,11 +928,12 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_set_char_spacing</function> function sets the
spacing between characters.</para>
spacing between characters.
</para>
<para>
See also <function>cpdf_set_word_spacing</function>,
<function>cpdf_set_leading</function>.</para>
<function>cpdf_set_leading</function>.
</para>
</refsect1>
</refentry>
@ -912,12 +953,12 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_set_word_spacing</function> function sets the
spacing between words.</para>
spacing between words.
</para>
<para>
See also <function>cpdf_set_char_spacing</function>,
<function>cpdf_set_leading</function>.</para>
<function>cpdf_set_leading</function>.
</para>
</refsect1>
</refentry>
@ -937,14 +978,14 @@ cpdf_end_text($pdf) ?>
</funcsynopsis>
<para>
The <function>cpdf_continue_text</function> function outputs the
string in <parameter>text</parameter> in the next line.</para>
string in <parameter>text</parameter> in the next line.
</para>
<para>
See also <function>cpdf_show_xy</function>,
<function>cpdf_text</function>,
<function>cpdf_set_leading</function>,
<function>cpdf_set_text_pos</function>.</para>
<function>cpdf_set_text_pos</function>.
</para>
</refsect1>
</refentry>
@ -965,11 +1006,11 @@ cpdf_end_text($pdf) ?>
<para>
The <function>cpdf_stringwidth</function> function returns the
width of the string in <parameter>text</parameter>. It requires
a font to be set before.</para>
a font to be set before.
</para>
<para>
See also <function>cpdf_set_font</function>.</para>
See also <function>cpdf_set_font</function>.
</para>
</refsect1>
</refentry>
@ -990,11 +1031,11 @@ cpdf_end_text($pdf) ?>
The <function>cpdf_save</function> function saves the current
enviroment. It works like the postscript command gsave. Very
useful if you want to translate or rotate an object without effecting
other objects.</para>
other objects.
</para>
<para>
See also <function>cpdf_restore</function>.</para>
See also <function>cpdf_restore</function>.
</para>
</refsect1>
</refentry>
@ -1014,21 +1055,22 @@ cpdf_end_text($pdf) ?>
<para>
The <function>cpdf_restore</function> function restores the
enviroment saved with <function>cpdf_save</function>. It works
like the postscript command grestore. Very
useful if you want to translate or rotate an object without effecting
other objects.
like the postscript command grestore. Very useful if you want
to translate or rotate an object without effecting other objects.
<example>
<title>Save/Restore</title>
<programlisting>
&lt;?php cpdf_save($pdf);
&lt;?php
cpdf_save($pdf);
// do all kinds of rotations, transformations, ...
cpdf_restore($pdf) ?>
</programlisting></example></para>
cpdf_restore($pdf)
?&gt;
</programlisting>
</example>
</para>
<para>
See also <function>cpdf_save</function>.</para>
See also <function>cpdf_save</function>.
</para>
</refsect1>
</refentry>
@ -1043,21 +1085,22 @@ cpdf_restore($pdf) ?>
<funcprototype>
<funcdef>void <function>cpdf_translate</function></funcdef>
<paramdef>int <parameter>pdf document</parameter></paramdef>
<paramdef>double <parameter>x-koor</parameter></paramdef>
<paramdef>double <parameter>y-koor</parameter></paramdef>
<paramdef>int <parameter>mode</parameter></paramdef>
<paramdef>double <parameter>x-coor</parameter></paramdef>
<paramdef>double <parameter>y-coor</parameter></paramdef>
<paramdef>int <parameter><optional>mode</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The <function>cpdf_translate</function> function set the origin of
coordinate system to the point (<parameter>x-koor</parameter>,
<parameter>y-koor</parameter>).</para>
coordinate system to the point (<parameter>x-coor</parameter>,
<parameter>y-coor</parameter>).
</para>
<para>
The last optional parameter determines the unit length. If is 0 or omitted
the default unit as specified for the page is used. Otherwise the koodinates
are measured in postscript points disregarding the current unit.</para>
the default unit as specified for the page is used. Otherwise the
coordinates are measured in postscript points disregarding the current
unit.
</para>
</refsect1>
</refentry>