Q:
I receive some PDF files with massive fonts (e.g. Arial Unicode MS) which bloat the file size by >20 MB.
Can I use PDFTron Optimizer (http://www.pdftron.com/pdfnet/samplecode.html#Optimizer) to shrink these files? I would like only to keep the glyphs that are acutally used in the document.
A:
Yup, you can do this with SubsetFonts(true) in Optimizer.TextSettings.
This is shown in the following code snippet (in VB other languages are basically the same apart from syntax differences):
…
Dim optTextsettings As New Optimizer.TextSettings
optTextsettings.SubsetFonts(True)
optTextsettings.EmbedFonts(False)
Dim optSettings As New Optimizer.OptimizerSettings
optSettings.SetTextSettings(optTextsettings)
Optimizer.Optimize(doc, optSettings)
…
doc.Save(…)