How to make GhostScript PS2PDF stop a subset of fonts

I am using the ps2pdf14 utility that comes with GhostScript and I have a font problem.

It doesn't seem to matter what instructions I pass to the team, it insists on a subset of any fonts that it finds in the original document.

eg

-dPDFSETTINGS # / prepress -dEmbedAllFonts # true -dSubsetFonts # false -dMaxSubsetPct # 0

Please note that # is because the command is run in windows, it is the same as =.

If anyone knows how to say ps2pdf so as not to multiply fonts, I would be very grateful.

thanks

-------------------------- Notes -------------------- --- -------------------

The source file is a pdf containing embedded fonts, so these are fonts already embedded in the source file, which I need to prevent a subset of in the target file.

Currently, all source file embedded fonts are subsets, in some cases this is not obvious from the font name, i.e. does not contain a hash, and at first glance appears as a full font, however, the widths array was a subset in all cases.

+4
source share
2 answers

I'm not sure what exactly you want to achieve. Perhaps the fonts are not embedded at all (not even a subset)? Or is it "I want not a subset, but a full font"?

Note 1:

  • The ps2pdf14 utility is a batch file that calls the real gswin32c.exe with a predefined array of command line parameters. You are more flexible to experiment if you completely construct the gswin32c command line yourself.

Note 2:

  • Ghostscript cannot embed fonts from the original PDF (at least AFAIK).

I have always been successful in managing font implementation policies with the following commands:

  gswin32c.exe ^
     -dBATCH ^
     -dNOPAUSE ^
     -sOutputFile = c: /path/to/my/output.pdf ^
     -sDEVICE = pdfwrite ^
     -dPDFSETTINGS = / prepress ^
     -dCompressFonts = false ^
     -dSubsetFonts = false ^
     -dEmbedAllFonts = true ^
     -c ".setpdfwrite << / NeverEmbed [] >> setdistillerparams" ^
     -fc: /path/to/my/postscript.ps

The previous one inserts all fonts (even “base 14”), completely (without a subset). The following does not embed any fonts:

  gswin32c.exe ^
     -dBATCH ^
     -dNOPAUSE ^
     -sOutputFile = c: /path/to/my/output.pdf ^
     -sDEVICE = pdfwrite ^
     -dPDFSETTINGS = / default ^
     -dEmbedAllFonts = false ^
     -c ".setpdfwrite << / AlwaysEmbed [] >> setdistillerparams" ^
     -fc: /path/to/my/postscript.ps

Note 3:

  • ..setpdfwrite part causes defaults, which are considered useful for creating PDF. If it appears last on the command line, it can override what you set earlier. Therefore, the /NeverEmbed [ ] and / or /AlwaysEmbed [ ] p /AlwaysEmbed [ ] were added subsequently , immediately before the input file was called.
+5
source

Try creating a settings file containing:

<</ SubsetFonts false → setdistillerparams

0
source

Source: https://habr.com/ru/post/918428/


All Articles