jsPDF icon indicating copy to clipboard operation
jsPDF copied to clipboard

Merge and/or edit pages with/of existing PDF

Open g0ddest opened this issue 11 years ago • 71 comments

Is this possible to merge generated pdf pages with existing pdf file pages? It is useful for many purposes such as waterark. This feature is implimented in many pdf libraries such as pyPDF (mergePage).

g0ddest avatar Aug 28 '13 12:08 g0ddest

That would be nice. :)

Merg1255 avatar Aug 30 '13 12:08 Merg1255

+1

olsp avatar Nov 19 '13 09:11 olsp

I am in need of this feature as well.

carmex avatar Jul 07 '14 18:07 carmex

would definitely help around the limitation of available fonts!

czarly avatar Dec 17 '14 09:12 czarly

+1

lvarayut avatar Jan 08 '15 04:01 lvarayut

+1

craigweiser avatar Jan 10 '15 17:01 craigweiser

+1

rubikloc avatar Feb 28 '15 15:02 rubikloc

+1

AlexHuckert avatar Feb 28 '15 15:02 AlexHuckert

+1

jirikavi avatar Mar 18 '15 07:03 jirikavi

this would be a killer feature! +1

clawish avatar Apr 19 '15 21:04 clawish

+++1111

hadim avatar Jul 06 '15 20:07 hadim

+9000 "What?! 9000!?!?!"

donatsu avatar Jul 28 '15 08:07 donatsu

+1

prasaz avatar Aug 31 '15 02:08 prasaz

+1

maxvanceffer avatar Jan 19 '16 15:01 maxvanceffer

My use case is ... I can create a PDF with jsPDF, but then I want to import an "existing PDF that has complex rendering on it" and then use jsPDF to add annotations and other visual elements to that "existing PDF" and then continue on adding more pages.

jsPDF is able to import existing images into the in-creation PDF but it currently does not appear to add existing PDFs into in-creation PDF. I would like to request this feature...


Dec, 2017 update P.S. I have been using TCPDF + FPDI

dennis-fedco avatar Feb 19 '16 16:02 dennis-fedco

Seems like duplicate of issue #777

stoianchoo avatar Aug 29 '16 11:08 stoianchoo

@stoianchoo you can compare years (or numbers) of issues and got to know which issue is duplicate :smile:

g0ddest avatar Aug 29 '16 12:08 g0ddest

I need this feature as well, I don't mind taking a crack at this, but @MrRio can you indicate if this is fairly easy to do (I don't have much knowledge of the PDF specs).

rogerfar avatar Nov 22 '16 19:11 rogerfar

I wish you luck! I am currently using PHP 3rd party libraries called TCPDF + FPDI to accomplish this, and gave up on the JS way.

I can take an existing (incredibly complex engineering drawing) PDF file page as a template, add text/images to that template, and display the resulting page as PDF, and add more pages to it as needed, by using those libraries. This is what is demanded by my application. Looking around there were no JS way to do this. So if you make it happen.. Hoorah!

It is also funny that I generate graphs for that PDF using JS graph library on client-side first, but to be able to include them into PDF with help of the back-end PHP libraries, I encode them as BASE64 client-side, send them via POST to the server, on back-end I save them as image, then plug them into the PDF using the libraries. It is fun.

dennis-fedco avatar Nov 22 '16 19:11 dennis-fedco

That's exactly what I do too, I generate a PDF in Base64 and post it to the server, the server will then append a few other PDF's and return the Base64 back to me, which I then just call a saveAs on.

Problem is that our app is fully offline and sometimes I can't make the round trip to the server.

rogerfar avatar Nov 22 '16 20:11 rogerfar

+1 I need to draw bounding boxes in an existing pdf. Could not find a javascript-way yet..

lgalke avatar Mar 07 '17 11:03 lgalke

+1

Sritharan-racap avatar Aug 14 '17 20:08 Sritharan-racap

+1

my use case is to add a stamp to PDFs. For example: Paid stamp on PDF invoice.

rvalle avatar Dec 08 '17 10:12 rvalle

There is no real data-layer so this would be something for version 3.0 or so.

Uzlopak avatar Dec 08 '17 16:12 Uzlopak

+1

tejash-jl avatar Dec 21 '17 08:12 tejash-jl

+1

mariots182 avatar Feb 12 '18 01:02 mariots182

+1

rafalkasa avatar May 04 '18 07:05 rafalkasa

+1

RichardLindhout avatar May 15 '18 12:05 RichardLindhout

+1

richardfrey avatar Jun 08 '18 10:06 richardfrey

+1

pabloxn avatar Jun 19 '18 11:06 pabloxn