我试图使用Ghostscript将PDF作为“最后一页”添加到多个其他PDF中。我遇到的问题是Ghostscript遍历整个PDF并做了一堆字体替换。将页面批量添加到多个PDF中而不会混淆字体
我使用以下批处理脚本:
FOR %%G IN (*.pdf) DO IF NOT %%G==lastpage.pdf gswin64c -sDEVICE=pdfwrite -sOutputFile="output\%%G" -dNOPAUSE -dBATCH "%%G" lastpage.pdf
典型的错误:
Page 12
Substituting font Courier for GGCJBF+Courier.
我有时也会得到其他错误,像这样:
jbig2dec FATAL ERROR decoding image: prevent DOS while decoding height classes (segment 0x00)
failed to create parsed JBIG2GLOBALS object.
**** Error reading a content stream. The page may be incomplete.
**** File did not complete the page properly and may be damaged.
所有我需要gs做的是追加我的lastpage.pdf到现有的PDF 没有遍历我正在追加的所有PDF,尤其是字体替换,因为我不会使用其他人在其PDF中使用的大部分字体。
是否有可能在gs中简单追加而不遍历PDF的每一页?是否有另一种工具可以在不存在此问题的情况下批量添加PDF?
请尝试[PDFToolkit](https://www.pdflabs.com/tools/pdftk-server/)。 '服务器'版本是做这种操作的命令行。 – 2014-10-11 07:57:09