0

I'd like to overlay output from PrinceXML onto pages from a PDF in the file system. I'm going to build the solution in our Zend framework environment and I think I'd prefer if the solution used Zend_Pdf if that's possible.

Any suggestions? I suppose I could use something like fpdf & fpdi and somehow channel the PrinceXML output through that; but has anyone used Zend_Pdf to do an overlay with the output from PrinceXML and a static PDF "template" file?

HardlyNoticeable
  • 497
  • 9
  • 26
  • So you'll produce a PDF document using PrinceXML and then you want to merge some of those pages into an existing PDF document? If its just inserting pages from one PDF into another, yes, you could do that with Zend_Pdf, or even the command line pdftk (yeah, it sux to have to run a binary to get something done, but pdftk is awfully quick, so the speed may justify the inelegance). But if you want to "overlay" page, that is, pick some elements off a page in one document and add to a page in an existing document, hmmm, no, don't know how you would go about doing that in PHP at all. – JamesG Aug 29 '12 at 01:48
  • @JamesG - Thanks for responding James. What I specifically want to do is place the contents of a static PDF, from the file system, _behind_ a generated PDF, from PrinceXML. As in I'll merge two pages together from two different files to make one page, and do that for each page in the generated PDF. I have done this before, in PHP, using fpdf and fpdi; fpdi is an extension to fpdf that adds this functionality. It even has an option for putting page 1 from the static PDF behind all of the odd pages, and page 2 behind all the even pages. But this time I'm working with PrinceXML and Zend. – HardlyNoticeable Aug 29 '12 at 15:34

0 Answers0