如何使Ghostscript的`ps2pdf14'停止设置字体 [英] How to make Ghostscript's `ps2pdf14` stop subsetting fonts

查看:89
本文介绍了如何使Ghostscript的`ps2pdf14'停止设置字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ghostscript附带的ps2pdf14实用程序,并且字体有问题.

I am using the ps2pdf14 utility that ships with Ghostscript, and I am having a problem with fonts.

我向命令传递什么指令似乎无关紧要,它坚持要对在源文档中找到的所有字体进行子设置.

It does not seem to matter what instructions I pass to the command, it insists on subsetting any fonts it finds in the source document.

例如


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

请注意,#是因为该命令在Windows上运行,因此它与=相同.

Note that the # is because the command is running on Windows, it is the same as =.

如果有人知道如何告诉ps2pdf不要对字体进行子集设置,我将不胜感激.

If anyone has any idea how to tell ps2pdf not to subset fonts, I would be very grateful.

--------------------------注释-------------------- ----------------------

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

源文件是包含嵌入式字体的PDF,因此它是已经嵌入在源文件中的字体,因此我需要防止其成为目标文件中的子集.

The source file is a PDF containing embedded fonts, so it is the fonts already embedded in the source file, that I need to prevent being subset in the destination file.

当前所有源文件嵌入字体都是子集,在某些情况下,从字体名称中看不出来,即它不包含哈希,乍看之下是完整字体,但是widths数组在所有字体中都是子集案例.

Currently all source file embedded fonts are subset, in some cases this is not apparent from the font name, i.e it contains no hash, and appears at first glance to be the full font, however the widths array has been subset in all cases.

推荐答案

我不确定您要实现的目标是什么.可能根本没有字体嵌入(甚至不是子集)?还是我不想要子集,而是完整的字体"?

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"?

  • ps2pdf14实用程序是一个批处理文件,它使用命令行参数的预设数组调用实际的gswin32c.exe.如果您完全自己构建gswin32c命令行,则可以更灵活地进行实验.
  • 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.
  • Ghostscript无法取消嵌入源PDF(至少是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

前一个完全嵌入了所有字体(甚至是"Base 14"字体)(没有子设置).下一个没有嵌入任何字体:

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

注释3:

  • .setpdfwrite部分调用被认为对创建PDF有益的默认值.如果它出现在命令行的最后,则它可能会覆盖您之前设置的内容.因此,/NeverEmbed [ ]和/或/AlwaysEmbed [ ] p部分在调用输入文件之前添加了 .
  • 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.
    • 这篇关于如何使Ghostscript的`ps2pdf14'停止设置字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆