【问题标题】:Ghostscript Combine ps with pdf file and add the first line (header)Ghostscript 将ps与pdf文件结合并添加第一行(标题)
【发布时间】:2018-03-04 10:37:26
【问题描述】:

我需要将 ps 与 pdf 文件合并,并为合并的文件添加第一行 "#S Company Name"

我使用命令:

gswin64c.exe -o combine.ps -sDEVICE=ps2write -f fax003.ps -f warning.pdf

如何在输出文件 combine.ps 中添加额外的行 "#S Company Name"

应该得到这样的文件:

#S Company Name  **-- first line--** 
%!PS-Adobe-3.0
%%BoundingBox: 0 0 595 842
%%HiResBoundingBox: 0 0 595.00 842.00
%%Creator: GPL Ghostscript 922 (ps2write)
%%LanguageLevel: 2
%%CreationDate: D:20180304115454+02'00'
%%Pages: 13
%%EndComments
%%BeginProlog
/DSC_OPDFREAD true def
/SetPageSize true def
/EPS2Write false def
currentdict/DSC_OPDFREAD known{
currentdict/DSC_OPDFREAD get
}{
false
}ifelse
10 dict begin
/DSC_OPDFREAD exch def
/this currentdict def
...

【问题讨论】:

    标签: pdf text ghostscript ps


    【解决方案1】:

    您作为输出文件编写的不是有效的 PostScript。 “#5....”文本的存在将导致 PostScript 解释器抛出错误。

    因此,假设您有一个将被剥离的工作流程。你不能用未经修改的 Ghostscript 做到这一点。您唯一的解决方案是在文件完全输出后打开文件并对其进行修改。或者,当然,更改 pdfwrite 设备源代码并重建 Ghostscript 可执行文件。

    由于您似乎在商业环境中使用 Ghostscript,我能否请您注意提供它的许可证?这是 AGPL v3,它涵盖了诸如软件即服务之类的使用。我不想让你认为我在指责你使用 Ghostscript,而不是按照许可条款,我只是想确保你知道这些条款。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-18
      • 2011-12-30
      • 2016-07-13
      相关资源
      最近更新 更多