The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

xaphod (10) [Avatar] Offline
#1
Hi,
Is it possible to merge several pdf's into a new single pdf?
blowagie (284) [Avatar] Offline
#2
Re: Merge PDF
Yes, this is explained in Chapter 2.
Note that at the time the book was written, only class PdfCopy existed to do this.
Since the book was written, a class PdfSmartCopy was added.

The difference:
The memory stamp and CPU use of PdfCopy is lower, but the end result can be a larger PDF file.
The memory stamp and CPU use of PdfSmartCopy is higher, but the end result can be a smaller PDF file.

Typically, you'll use PdfCopy if the documents that need to be concatenated are totally different, and PdfSmartCopy if the documents contain a lot of similar objects (for instance: they share the same PdfTemplate, the same logo,...).