You can please try optimizing the output PDF and see if it helps in removing the duplicate fonts. In case issue keeps persisting, please share the sample PDF for our reference and we will further proceed to assist you accordingly:
Thanks for the reply, looking at your code, you are unembedding the fonts:
oo.UnembedFonts = true;
I want to embed the fonts, but only once. Yes unembedding the fonts makes the PDF size much smaller, but unfortunately I need to embed at least one of each font style. The issue is I don’t need all the extra embedded fonts multiple times.
I tried your code and it removed all of the embedded fonts and the pdf is much smaller, but that doesn’t solve the issue.
I tried to unembed fonts = true for each individual PDF, and then unembed fonts = false after concatenating into one large PDF, but that didn’t work either.
You can try on your own to create multiple PDF files and then try to concatenate them into a single PDF. Then check whether the final PDF embedded each of the font styles once or multiple times, as in my case.
Another question is, when I’m combining multiple PDF’s, should I be optimizing each PDF before combining or just optimize the final PDF after concatenating?
We are sorry that suggested approach did not suit your needs. Please note that unembedding fonts is a complex process and it typically involves modifying the PDF document and its resources. Also, we could create a PDF but it may not be identical to the type of PDF documents that you are having. It would be helpful for our investigation if you can share any sample PDF document that contains 2 or more duplicate fonts in it. We will proceed with the analysis accordingly.
The recommended approach would be to optimize the resultant PDF that you obtain after concatenation.