문제

Out of tons of questions and answers here about manipulating PDF's with PHP, but none of them seem to fit my requirement.

Programmatically, I want to be able to update the content of editable fields. Preferably with PHP. If it matters, the PDF files will be initially hand crafted (as sort of 'template' files that will be copied and filled in over and over again). The list of PDF_* functions on php.net doesn't give me anything that looks (directly) promising.

Is this possible with PHP? How?

도움이 되었습니까?

해결책

The best way that maintains the look and feel of the original PDF is to use the PDFLib block plugin for Acrobat. PDFLib is the library behind all of the PHP PDF functions. More information on the block plugin can be found on the PDFLib website, there is a link on the main page called "The PDFlib Block Plugin".

The process to use is to create all of the "editable fields" known as blocks with the plugin in Acrobat. Once that is done, the template can be programmatically imported and the fields can be filled in. There are also features to match the font, size, style, etc. of the font on the page programmatically so that it appears correctly in the document. Here are pages in the cookbook on how to do various things with Block Handling and PPS: http://www.pdflib.com/pdflib-cookbook/block-handling-and-pps/

다른 팁

TCPDF is the best PDF library.

However follow this: PHP PDF template library with PDF output?

:)

http://framework.zend.com/manual/en/zend.pdf.html

and more specifically here (unless I misunderstood you)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top