【发布时间】:2015-05-06 21:15:45
【问题描述】:
我正在使用此命令将 PDF 转换为一组 JPEG 文件:
convert -strip -quality 100 -alpha off \
-density 165% -scene 1 tmp3GtW_h.pdf /tmp/a1.jpg
这是原始 PDF:
字体更细,更类似于 Helvetica。
结果如下:
输出的 JPEG 文件中的字体不同且更粗。
convert 命令显示此警告:
**** Warning: An error occurred while reading an XREF table.
**** The file has been damaged. This may have been caused
**** by a problem while converting or transfering the file.
**** Ghostscript will attempt to recover the data.
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Microsoft? PowerPoint? 2013 <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
转换的版本是:
$ convert --version
Version: ImageMagick 6.8.9-7 Q16 x86_64 2014-12-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: jng jpeg png x xml zlib
Ghostscript 版本是:
$ gs --version
9.10
我的问题是
1) 我该如何解决这个问题?
2) 如何判断PDF文件使用的是什么字体?
3) 我如何知道convert 和gs 可以使用哪些字体?
编辑:找到问题 2 的答案。这是pdffonts 命令的结果:
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Intro Black Italic Type 1 WinAnsi no no no 145 0
Intro Regular Type 1 WinAnsi no no no 147 0
Intro Black Inline Caps Type 1 WinAnsi no no no 388 0
ABCDEE+Segoe UI TrueType WinAnsi yes yes no 2233 0
ABCDEE+Segoe UI,Italic CID TrueType Identity-H yes yes yes 2607 0
ABCDEE+Segoe UI,Italic TrueType WinAnsi yes yes no 2612 0
Intro Bold Italic Type 1 WinAnsi no no no 3781 0
【问题讨论】:
标签: ubuntu pdf imagemagick