http://www.fpdf.org/ is also quite good. Np lib install is required
-Shelon Padmore
![]() |
|
||||||||||
|
CXVIII. PDF ФункцииВведениеThe PDF functions in PHP can create PDF files using the PDFlib library which was initially created by Thomas Merz and is now maintained by PDFlib GmbH. The documentation in this section is only meant to be an overview of the available functions in the PDFlib library and should not be considered an exhaustive reference. For the full and detailed explanation of each function, consult the PDFlib Reference Manual which is included in all PDFlib packages distributed by PDFlib GmbH. It provides a very good overview of what PDFlib is capable of doing and contains the most up-to-date documentation of all functions. For a jump start we urge you to take a look at the programming samples which are contained in all PDFlib distribution packages. These samples demonstrate basic text, vector, and graphics output as well as higher-level functions, such as the PDF import facility (PDI). All of the functions in PDFlib and the PHP module have identical function names and parameters. Unless configured otherwise, all lengths and coordinates are measured in PostScript points. There are generally 72 PostScript points to an inch, but this depends on the output resolution. Please see the PDFlib Reference Manual included in the PDFlib distribution for a more thorough explanation of the coordinate system used. With version 6, PDFlib offers an object-oriented API for PHP 5 in addition to the function-oriented API for PHP 4. The main difference is the following: In PHP 4, first a PDF resource has to be retrieved with a function call like $p = PDF_new(). This PDF resource is used as the first parameter in all further function calls, such as in PDF_begin_document($p, "", ""). In PHP 5 however, a PDFlib object is created with $p = new PDFlib(). This object offers all PDFlib API functions as methods, e.g. as with $p->begin_document("", ""). In addition, exceptions have been introduced in PHP 5 which are supported by PDFlib 6 and later as well. Please see the examples below for more information.
ТребованияPDFlib Lite is available as open source. However, the PDFlib Lite license allows free use only under certain conditions. PDFlib Lite supports a subset of PDFlib's functionality; please see the PDFlib web site for details. The full version of PDFlib is available for download at http://www.pdflib.com/products/pdflib-family/, but requires that you purchase a license for commercial use. Issues with older versions of PDFlibAny version of PHP 4 after March 9, 2000 does not support versions of PDFlib older than 3.0. PDFlib 4.0 or greater is supported by PHP 4.3 and later. УстановкаЭто расширение PECL не поставляется вместе с PHP. Дополнительная информация, такая как новый версии, скачивание, исходные файлы, информация о разработчике и CHANGELOG, могут быть найдены здесь: http://pecl.php.net/package/pdflib.
To get these functions to work in PHP < 4.3.9, you have to compile
PHP with Типы ресурсовДанное расширение не определяет никакие типы ресурсов. Remarks about Deprecated PDFlib FunctionsStarting with PHP 4.0.5, the PHP extension for PDFlib is officially supported by PDFlib GmbH. This means that all the functions described in the PDFlib Reference Manual are supported by PHP 4 with exactly the same meaning and the same parameters. However, with PDFlib Version 5.0.4 or higher all parameters have to be specified. For compatibility reasons, this binding for PDFlib still supports most of the deprecated functions, but they should be replaced by their new versions. PDFlib GmbH will not support any problems arising from the use of these deprecated functions. The documentation in this section indicates old functions as "Deprecated" and gives the replacement function to be used instead. ПримерыMost of the functions are fairly easy to use. The most difficult part is probably creating your first PDF document. The following example should help to get you started. It is developed for PHP 4 and creates the file hello.pdf with one page. It defines some document info field contents, loads the Helvetica-Bold font and outputs the text "Hello world! (says PHP)".
The following example comes with the PDFlib distribution for PHP 5. It uses the new exception handling and object encapsulation features available in PHP 5. It creates the file hello.pdf with one page. It defines some document info field contents, loads the Helvetica-Bold font and outputs the text "Hello world! (says PHP)".
PDF Функции
spadmore1980 at gmail dot com
23-Oct-2007 03:23
http://www.fpdf.org/ is also quite good. Np lib install is required
taufiq at simplybuzz dot com
23-Oct-2007 01:13
There is XPDF Win32 binary package at SourceForge for pdftotext purpose that works.
praokean at yahoo dot com
22-Aug-2007 05:08
domPDF is not so great PDF creator becouse don't support foreign charachters.
Sam from dogmaConsult.de
15-Aug-2007 02:00
I seriously tried to get PDF parsing to work to use it in the indexing for fulltext search for a document management. But none of the pdf2text functions below worked for my test cases (among them an openoffice generated pdf file and a file generated by fpdf).
tatlar at yahoo dot com
14-Aug-2007 04:49
http://www.digitaljunkies.ca/dompdf/index.php
david at metabin
19-Jul-2007 04:19
Easiest way to get the text of a pdf is to install xpdf (on redhat yum -y install xpdf)
brain23 at gmx dot de
03-Jul-2007 07:28
For FPDF there also is an addon (FPDI) available, which let you import existing PDF documents:
pitvanester at gemail dot com 25-Jun-2007 07:54
Sorry, both versions of pdf2txt don
|
| © 2007 info@grandviewstudio.com |
| Z058440144362 Z348613067571 |