开发者

Is it possible to dynamically merge one PDF with another using dompdf?

开发者 https://www.devze.com 2023-01-05 20:52 出处:网络
I am trying to take the raw data from a previously made PDF, and append it to a new PDF using DOMPDF. Is this possible?

I am trying to take the raw data from a previously made PDF, and append it to a new PDF using DOMPDF. Is this possible?

Thanks for any help,开发者_如何学Go

Metropolis


Are you talking about overlaying one PDF on top of another or appending the pages of one document to another? DOMPDF doesn't currently support either type of functionality because it is focused on HTML to PDF conversion. Due to this focus by the project you're not likely to see any work put in to support the handling of existing PDFs anytime soon.

This doesn't help for your current project, but you might post a feature request to add support for a library that is capable of performing a merge (I think FPDI may work). DOMPDF relies on third-party PDF rendering engines for creation of the actual PDF. A modified version of the CPDF library is included with DOMPDF, but there's no reason other rendering engines couldn't be supported.


if it helps someone else, what I did, I concatenated the HTML string in a loop and then made a pdf file after the loop. And ofcourse using page-break-after: always; which creates a new page.

0

精彩评论

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