Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge PDF using dompdf? [closed]

Tags:

php

pdf

dompdf

I'm using dompdf library to create PDF. Beside I want to merge another PDF(it is located at particular path) pages with newly created PDF.

Is there anyway to do this using dompdf or Do we have any other library?

like image 224
Logan Avatar asked Feb 05 '13 06:02

Logan


People also ask

How to merge multiple PDF files into one document?

It's quick and easy to merge PDF files into a single document with the Adobe Acrobat online tool. Just add your files, merge them, and you're done. Merging multiple files into one PDF lets you store and review them more easily.

How do I convert a PDF to a separate file?

Select the PDF you want to insert and click Open. In the Insert Pages dialog box, specify where to insert the document (before or after the first or last page, or a designated page). Click OK. To leave the original PDF intact as a separate file, choose Save As, and type a new name for the merged PDF.

Is it possible to generate a PDF file with attached files?

Hello, we would like to generate a PDF file with attached files inside it ( embeded ). Is it possible to do with dompdf? This is unfortunately first possible with PDF file version 1.7 and dompf implements 1.3. It would be good to increase the version but we first need to eveluate which changes this needs on our side.

How do I add a file to an existing PDF?

You can also add an existing file to an opened PDF. Drag the file icon directly into the Page Thumbnails panel in the navigation pane. You can insert one or more pages of selected content copied from any application into an existing PDF.


1 Answers

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.

You would need to first render the HTML to PDF (maybe in two parts), then combine them using another tool like pdftk (system binary) or PDF Merger. I haven't tried PDF Merger, but pdftk works like a champ.

like image 66
Pratibha Avatar answered Oct 12 '22 12:10

Pratibha