LIII. Haru PDF Functions简介The PECL/haru extension provides bindings for Haru Free PDF Library - free, cross platform, opensource software library for generating PDF files. You can find the library here: http://libharu.sourceforge.net.
需求You need to install libharu first to be able to use PECL/haru. PECL/haru is tested with libharu 2.0.8, older versions might or might not work for you. PECL/haru also requires PHP 5.1.3 or newer. 安装安装此 PECL 扩展库的信息可在手册中标题为 PECL 扩展库安装的一章中找到。 更多信息如新版本,下载,源文件,维护者信息以及更新日志等可以在这里找到: http://pecl.php.net/package/haru. The latest PECL/haru Win32 DLL can be downloaded here: php_haru.dll. 运行时配置本扩展模块在 php.ini 中未定义任何配置选项。 范例
Open the result document in your favourite PDF viewer and you should see a light-blue rectangle and white "Hello World!" on it. 预定义类
Builtin Fonts And EncodingsBuiltin FontsThese Base14 fonts are built-in into PDF and all viewers can display them. Using these fonts may decrease the size of the result file and make the processing faster, avoiding loading external fonts. However the fonts support only latin1 character set and you have to load external fonts if you need to use an other character set. The Base14 fonts:
Builtin Encodings表 1. Single-byte character set encodings
表 2. Multi-byte character set encodings
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||