Subset fonts in existing PDF files

65 views
Skip to first unread message

Support

unread,
Jun 1, 2012, 4:39:30 PM6/1/12
to pdfne...@googlegroups.com
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(…)

Reply all
Reply to author
Forward
0 new messages