cvs: /phpdoc/functions cpdf.sgml

From: Date: Thu, 25 Nov 1999 07:00:24 +0000
Subject: cvs: /phpdoc/functions cpdf.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-13102@lists.php.net to get a copy of this message
steinm Thu Nov 25 02:00:24 1999 EDT Modified files: /phpdoc/functions cpdf.sgml Log: - changed encoding parameter of cpdf_set_font to string on advice from fastio to better support asian fonts. Index: phpdoc/functions/cpdf.sgml diff -u phpdoc/functions/cpdf.sgml:1.11 phpdoc/functions/cpdf.sgml:1.12 --- phpdoc/functions/cpdf.sgml:1.11 Thu Nov 11 01:21:46 1999 +++ phpdoc/functions/cpdf.sgml Thu Nov 25 02:00:23 1999 @@ -36,6 +36,11 @@ the next releases (current version when this was written is 1.10). If you need this functionality use the pdflib module.</simpara> + <note><simppara> + 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.</simppara></note> + <simpara> One big advantage of ClibPDF over pdflib is the possibility to create the pdf document completely in memory without using temporary files. @@ -57,7 +62,7 @@ $cpdf = cpdf_open(0); cpdf_page_init($cpdf, 1, 0, 595, 842); cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1"); -cpdf_set_font($cpdf, "Times-Roman", 30, 4); +cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding"); cpdf_set_text_rendering($cpdf, 1); cpdf_text($cpdf, "Times Roman outlined", 50, 750); cpdf_moveto($cpdf, 50, 740); @@ -494,7 +499,7 @@ <title>Text output</title> <programlisting> &lt;?php cpdf_begin_text($pdf); -cpdf_set_font($pdf, 16, "Helvetica", 4); +cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding"); cpdf_text($pdf, 100, 100, "Some text"); cpdf_end_text($pdf) ?> </programlisting></example></para> @@ -524,7 +529,7 @@ <title>Text output</title> <programlisting> &lt;?php cpdf_begin_text($pdf); -cpdf_set_font($pdf, 16, "Helvetica", 4); +cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding"); cpdf_text($pdf, 100, 100, "Some text"); cpdf_end_text($pdf) ?> </programlisting></example></para> @@ -640,7 +645,7 @@ <paramdef>int <parameter>pdf document</parameter></paramdef> <paramdef>string <parameter>font name</parameter></paramdef> <paramdef>double <parameter>size</parameter></paramdef> - <paramdef>int <parameter>encoding</parameter></paramdef> + <paramdef>string <parameter>encoding</parameter></paramdef> </funcsynopsis> <para> The <function>cpdf_set_font</function> function sets the the @@ -648,8 +653,10 @@ the standard postscript fonts are supported. The last parameter <parameter>encoding</parameter> can take the following values: - 2 = macroman, 3 = macexpert, 4 = winansi. - Any other value selects the font's buildin encoding.</para> + "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> </refsect1> </refentry>

« previous php.dev (#13102) next »