We use Merger to stitch together a set of documents into one, combined PDF file to send to our printer. One thing we noticed that the embedded fonts for each individual document get added to the merged document, even if they are the same.
For example, file1.pdf used the Calibri font and is embedded. file2.pdf also used the Calibri font and that is embedded in that pdf. When I create a merged document of the two, I get a duplicate set of Calibri embedded fonts. Now imagine combining a hundred or more individual pdfs... the file size is huge, 80% of which is the embedded fonts, all of which are dupes.
Is there a way to prevent this? Or at the very least, programmatically then remove the duplicate embedded fonts?
I can reproduce this with the most simple of code:
string path = "c:\\somepath";
string mergeFileName = Path.Combine(path, "mergedoc.pdf");
MergeDocument mergeDoc = new MergeDocument();
mergeDoc.Append(Path.Combine(path, "file1.pdf"));
mergeDoc.Append(Path.Combine(path, "file.pdf"));
mergeDoc.Draw(mergeFileName);