Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a PDF file that I want to compress as small as possible. Unfortunately GhostScript substituted some fonts for the existing fonts in the original PDF.

I used the following command when invoking GhostScript:

gswin64c -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite -o compressed-output.pdf input.pdf

The log from GhostScript looks like the following:

...
Substituting font Helvetica-Narrow for Frutiger-Cn.
Loading NimbusSanL-ReguCond font from %rom%Resource/Font/NimbusSanL-ReguCond... 4042872 2674104 2702120 1382849 3 done.
Substituting font Helvetica-Bold for Arial-BoldMT.
Loading NimbusSanL-Bold font from %rom%Resource/Font/NimbusSanL-Bold... 4022032 2407506 2702120 946315 3 done.
Substituting font Helvetica for ArialMT.
Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 4022032 2457581 2702120 996650 3 done.
Page 3
Substituting font Bookman-Light for BookmanOldStyle-Bold.
Loading URWBookmanL-Ligh font from %rom%Resource/Font/URWBookmanL-Ligh... 4022032 2524045 2500280 1046986 3 done.
...

If the original PDF already has the fonts why does GhostScript need to substitute some fonts for them when compressing the PDF? How to prevent GhostScript from doing this substitution?

share|improve this question
add comment

1 Answer

Ghostscript doesn't have access to the native Windows (TTF) fonts by default, so it uses the closest match it can find in its own font set.

Make sure fonts are embedded in your pdf. That should fix the problem with Ghostscript, and also ensures proper rendering of your pdf on non-windows platforms.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.