How to make Ghostscript's `ps2pdf14` stop subsetting fonts

做~自己de王妃 提交于 2019-11-30 09:58:19

I'm not sure what exactly you do want to achieve. Possibly no fonts at all embedded (not even as a subset)? Or is it "I want not subset, but the complete font"?

Note 1:

  • the ps2pdf14 utility is a batch file which invokes the real gswin32c.exe with a pre-set array of command line parameters. You are more flexible to experiment if you construct the gswin32c commandline fully on your own.

Note 2:

  • Ghostscript cannot un-embed fonts from a source PDF (at least AFAIK).

I have always had success controlling font embedding policies with the following commandlines:

  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" ^
    -f c:/path/to/my/postscript.ps

The previous one embeds all fonts (even the "Base 14" ones), fully (no subsetting). The next one 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" ^
    -f c:/path/to/my/postscript.ps

Note 3:

  • the .setpdfwrite part invokes defaults deemed to be beneficial for PDF creation. If it appears last on the commandline, it may override what you did set before. Hence the /NeverEmbed [ ] and/or /AlwaysEmbed [ ] p parts added afterwards, just before invoking the input file.

Try creating a settings file containing:

<< /SubsetFonts false >> setdistillerparams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!