Remove duplicated fonts after mergin pages from the same document

In my process I split an entire .pdf in multiple .pdf each page in an entire new .pdf
obviously if the page contain embedded fonts o shared images the size will increase in each page.

Then I need to merge them again to one .pdf but the size increase because of the duplicated elements.

How can I prevent this? I don’t have the Optimizer license, this works great:

pdftron.PDF.Optimizer.Optimize(NewPDF);

But how can I remove only the duplicated embedded fonts from the same document using only
de pdf.net without Optimizer license?

Hi Fraga,

It sounds like you are asking us how to re-implement Optimizer with low-level PDFNet API. Unfortunately the answer would be verrrry long and convoluted since it is not a trivial task (even though you are only asking about font merging). So we would recommend using the high-level API: pdftron.PDF.Optimizer.

If you definitely want to do your own thing you may want to start by reading tutorial on low-level API in PDFNet (called SDF): https://www.pdftron.com/pdfnet/intro.html, SDF sample project: https://www.pdftron.com/pdfnet/samplecode.html#SDF and PDF spec http://xodo.com/view/#/c0c11968-ee14-478e-9b09-6dc5635c0915