Write html to an existing pdf

614 views
Skip to first unread message

John Milton

unread,
Mar 21, 2011, 12:52:16 AM3/21/11
to dompdf
Hi,

Is there a way to write html string to an existing pdf using dompdf?

Please help me.


Thanks

BrianS

unread,
Mar 22, 2011, 2:19:38 PM3/22/11
to dom...@googlegroups.com, John Milton
On Monday, March 21, 2011 12:52:16 AM UTC-4, John Milton wrote:
Is there a way to write html string to an existing pdf using dompdf?

DOMPDF does not include this type of functionality. You could use DOMPDF to render your HTML string into PDF format, but then you would need to use a library such as FPDI to add it to an existing PDF document.

Denis Liamkin

unread,
Apr 15, 2016, 5:23:07 PM4/15/16
to dompdf, sahaya...@gmail.com
So essentially do you mean merging a pdf on top of another pdf?

BrianS

unread,
Apr 15, 2016, 5:31:43 PM4/15/16
to dompdf, sahaya...@gmail.com
That is correct.

Denis Liamkin

unread,
Apr 16, 2016, 6:49:26 PM4/16/16
to dom...@googlegroups.com
Theoretically, if I went ahead and used DOMPDF to render a PDF file, do you know any code that could merge a PDF to an existing PDF? I want to make sure that if this merge is made, neither of the PDF's will first be converted into images (lose quality from any text vectors in the process).


Denis Liamkin

unread,
Apr 16, 2016, 6:51:43 PM4/16/16
to dom...@googlegroups.com
To be a little more specific, I can't see any example code anywhere online that takes two PDF files in FPDF and merges the two together.

BrianS

unread,
Apr 19, 2016, 9:53:02 AM4/19/16
to dom...@googlegroups.com
You are correct, FPDF isn't usually used directly for PDF merging, but a number of libraries are built on top of FPDF to do just that.

Check out Setassign's FDPI (https://www.setasign.com/products/fpdi/about/). Or you can abstract a bit more and use a library built on top of FPDF such as libmergepdf (https://github.com/hanneskod/libmergepdf).

Kashan Rasheed

unread,
Dec 14, 2017, 8:59:07 AM12/14/17
to dompdf
I wanna Write html to an existing pdf but can't alots of confusion there

BrianS

unread,
Dec 26, 2017, 8:55:29 PM12/26/17
to dompdf
If you have a question you should start a new thread and provide some details.
Reply all
Reply to author
Forward
0 new messages