将pdf转换为图形文件格式(jpg,png,tiff )

・1 分钟阅读

将pdf转换为图形文件格式(jpg,png,tiff ,)

convert sample.pdf sample.jpg
需要ImageMagick软件包
示例输出
gnu@robby:/tmp/tigre$ ls
doc_data.txt pg_0004.pdf pg_0009.pdf pg_0014.pdf pg_0019.pdf pg_0024.pdf
lt003.pdf pg_0005.pdf pg_0010.pdf pg_0015.pdf pg_0020.pdf
pg_0001.pdf pg_0006.pdf pg_0011.pdf pg_0016.pdf pg_0021.pdf
pg_0002.pdf pg_0007.pdf pg_0012.pdf pg_0017.pdf pg_0022.pdf
pg_0003.pdf pg_0008.pdf pg_0013.pdf pg_0018.pdf pg_0023.pdf
gnu@robby:/tmp/tigre$ convert pg_0001.pdf test.png
 **** Warning: Generation number out of 0..65535 range, assuming 0.
 **** Warning: File has an invalid xref entry: 2. Rebuilding xref table.
 **** This file had errors that were repaired or ignored.
 **** The file was produced by: 
 **** >>>> itext-paulo-155 (itextpdf.sf.net-lowagie.com) <<<<
 **** Please notify the author of the software that produced this
 **** file that it does not conform to Adobe's published PDF
 **** specification.
gnu@robby:/tmp/tigre$ file test.png 
test.png: PNG image, 595 x 780, 16-bit/color RGB, non-interlaced
Hujiuxiang profile image