mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
New structure applied
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78830 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
5e753f604e
commit
603f0ecfc3
2 changed files with 96 additions and 85 deletions
|
@ -1,17 +1,20 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<reference id="ref.bc">
|
||||
<title>BCMath Arbitrary Precision Mathematics Functions</title>
|
||||
<titleabbrev>BC math</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<para id="bc.intro">
|
||||
For arbitrary precision mathematics PHP offers the Binary Calculator which
|
||||
supports numbers of any size and precision, represented as strings.
|
||||
</para>
|
||||
<section id="bc.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
For arbitrary precision mathematics PHP offers the Binary Calculator which
|
||||
supports numbers of any size and precision, represented as strings.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="bc.requirements">
|
||||
<title>Requirements</title>
|
||||
&reftitle.required;
|
||||
<para>
|
||||
Due to changes in the licensing, the BCMATH library is distributed
|
||||
separate from the standard PHP source distribution.
|
||||
|
@ -23,7 +26,7 @@
|
|||
</section>
|
||||
|
||||
<section id="bc.installation">
|
||||
<title>Installation</title>
|
||||
&reftitle.install;
|
||||
<para>
|
||||
In PHP 4, these functions are only available if PHP was configured with
|
||||
<link linkend="install.configure.enable-bcmath"><option role="configure">--enable-bcmath</option></link>.
|
||||
|
@ -33,18 +36,18 @@
|
|||
</section>
|
||||
|
||||
<section id="bc.configuration">
|
||||
<title>Runtime Configuration</title>
|
||||
&no.config;
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<section id="bc.resources">
|
||||
<title>Resource types</title>
|
||||
&no.resource;
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
<section id="bc.constants">
|
||||
<title>Predefined constants</title>
|
||||
&no.constants;
|
||||
&reftitle.constants;
|
||||
&no.constants;
|
||||
</section>
|
||||
</partintro>
|
||||
|
||||
|
|
|
@ -1,68 +1,67 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<reference id="ref.cpdf">
|
||||
<title>ClibPDF functions</title>
|
||||
<titleabbrev>ClibPDF</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<simpara>
|
||||
ClibPDF lets you create PDF documents with PHP. It is available for
|
||||
download from <ulink url="&url.fastio;">FastIO</ulink>, but
|
||||
requires that you purchase a license for commercial use. ClibPDF
|
||||
functionality and API are similar to <link
|
||||
linkend="ref.pdf">PDFlib</link>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
This documentation should be read alongside the ClibPDF manual since it
|
||||
explains the library in much greater detail.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Many functions in the native ClibPDF and the PHP module, as well
|
||||
as in <link linkend="ref.pdf">PDFlib</link>, 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 PHP 3
|
||||
to support asian fonts. The encoding parameter is no longer an integer
|
||||
but a string.
|
||||
</simpara>
|
||||
</note>
|
||||
<simpara>
|
||||
A nice feature of ClibPDF (and <link
|
||||
linkend="ref.pdf">PDFlib</link>) is the ability 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 feature can also be simulated by
|
||||
<function>pdf_translate</function> when using the <link
|
||||
linkend="ref.pdf">PDFlib</link>. functions.)
|
||||
</simpara>
|
||||
<simpara>
|
||||
Another nice feature of ClibPDF is the fact that any page can be modified
|
||||
at any time even if a new page has been already opened. The function
|
||||
<function>cpdf_set_current_page</function> allows to leave the current
|
||||
page and presume modifying an other page.
|
||||
</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 to 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>
|
||||
<section id="cpdf.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
ClibPDF lets you create PDF documents with PHP. It is available for
|
||||
download from <ulink url="&url.fastio;">FastIO</ulink>, but
|
||||
requires that you purchase a license for commercial use. ClibPDF
|
||||
functionality and API are similar to <link
|
||||
linkend="ref.pdf">PDFlib</link>.
|
||||
</para>
|
||||
<para>
|
||||
This documentation should be read alongside the ClibPDF manual since it
|
||||
explains the library in much greater detail.
|
||||
</para>
|
||||
<para>
|
||||
Many functions in the native ClibPDF and the PHP module, as well
|
||||
as in <link linkend="ref.pdf">PDFlib</link>, have the same name.
|
||||
All functions except for <function>cpdf_open</function> take the
|
||||
handle for the document as their first parameter.
|
||||
</para>
|
||||
<ara>
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
A nice feature of ClibPDF (and <link
|
||||
linkend="ref.pdf">PDFlib</link>) is the ability 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 feature can also be simulated by
|
||||
<function>pdf_translate</function> when using the <link
|
||||
linkend="ref.pdf">PDFlib</link> functions.)
|
||||
</para>
|
||||
<para>
|
||||
Another nice feature of ClibPDF is the fact that any page can be modified
|
||||
at any time even if a new page has been already opened. The function
|
||||
<function>cpdf_set_current_page</function> allows to leave the current
|
||||
page and presume modifying an other page.
|
||||
</para>
|
||||
<para>
|
||||
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 to 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.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="cpdf.examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Simple ClibPDF Example</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
$cpdf = cpdf_open(0);
|
||||
|
@ -82,16 +81,16 @@ cpdf_output_buffer($cpdf);
|
|||
cpdf_close($cpdf);
|
||||
?>
|
||||
]]>
|
||||
</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>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
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:
|
||||
</para>
|
||||
<example>
|
||||
<title>pdfclock example from pdflib 2.0 distribution</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
$radius = 200;
|
||||
|
@ -181,14 +180,23 @@ cpdf_output_buffer($pdf);
|
|||
cpdf_close($pdf);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</partintro>
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section id="cpdf.seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
See also the <link linkend="ref.pdf">PDFlib</link>
|
||||
extension documentation.
|
||||
</para>
|
||||
</section>
|
||||
</partintro>
|
||||
|
||||
&reference.cpdf.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue