如何使GhostScript PS2PDF停止字体的子集 [英] How to make GhostScript PS2PDF stop subsetting fonts

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

问题描述

我正在使用GhostScript附带的ps2pdf14实用程序,并且遇到字体问题。



传递给命令的指令似乎并不重要,它坚持要在源文档中找到任何字体的子集。

例如

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



请注意#是因为命令在windows上运行,与=相同。

<如果任何人有任何想法如何告诉ps2pdf不要子集字体,我会非常感激。

谢谢

--------------------------笔记-------------------- ----------------------



源文件是一个包含嵌入字体的pdf,所以它是字体已经嵌入源文件,我需要防止在目标文件中的子集。

目前所有源文件嵌入字体是子集,在某些情况下,这是从字体名称不明显,即它不包含哈希,并乍一看是完整的l字体,但是widths数组在所有情况下都是子集。

解决方案

我不确定你到底想要什么实现。嵌入式(甚至不作为子集)可能没有字体?或者是我不是子集,而是完整的字体?

注意1:

$ ul $ b
  • ps2pdf14 实用程序是一个批处理文件,它用预先调用的方式调用真实的 gswin32c.exe 命令行参数数组。注意2:$ b $


    $ h
    $ b

    • Ghostscript不能从源代码PDF(至少AFAIK)中取消嵌入字体。


    我一直使用以下命令行来控制字体嵌入策略:


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

    前一个嵌入了所有的字体(甚至是Base 14一个),完全(没有子集)。下一个不会嵌入任何字体:


    $ b 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



    注意3:


    • .setpdfwrite部分调用被认为对PDF创建有利的默认值。如果它最后出现在命令行中,它可能会覆盖您之前设置的内容。因此, ,就在调用输入文件之前。


    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.

    e.g

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

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

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

    Thanks

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

    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.

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

    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.

    这篇关于如何使GhostScript PS2PDF停止字体的子集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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