I know that merging pdfs is possible using iText, for example using PdfCopy class. However I got 100ish pdfs based on the one template ( they got the same graphics, just different wording )
Is it possible, during merging, to copy images once and then use references to those images later on ?
I believe PdfSmartCopy will take care of that for you... let me check. Aha! It does indeed. It builds MD5 hashes of the streams it encounters (fonts, images, content streams) and compares them based on the hash and then the actual bytes.
PdfSmartCopy uses more memory on account of the caching it does for these comparisons, but the resulting PDFs will be smaller... in your case much smaller.
posted 8 years ago
Fantastic ! Thanks Mark
You can't have everything. Where would you put it?