开发者

Mutating PDF editable fields programmatically

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

Programmatically开发者_如何学C, 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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜