使用Ghostscript将TIFF转换为PDF
您能告诉我如何使用Ghostscript或Postscript将TIFF转换为PDF吗?
Could you tell me how can I convert TIFF to PDF with using Ghostscript or Postscript?
我尝试使用此命令:
gswin32c.exe -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=o.pdf test.tif
但是它不起作用.
它产生一个错误:
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in II*
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1169/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 4
GPL Ghostscript 9.06: Unrecoverable error, exit code 1
Ghostscript读取PDF和PostScript作为输入,它不读取图像格式,特别是不读取TIFF.但是PostScript是一种编程语言,因此完全可以编写PostScript程序来读取TIFF文件(Ghostscript随附的viewgif.ps和viewjpeg.ps程序可用于GIF和JPEG格式)
Ghostscript reads PDF and PostScript as input, it doesn't read image formats, and in particular doesn't read TIFF. However PostScript is a programming language, so it is entirely possible to write a PostScript program to read a TIFF file (the viewgif.ps and viewjpeg.ps program supplied with Ghostscript do this for GIF and JPEG formats)
我确实有一个程序可以做到这一点,并且已经在comp.lang.postscript上发布了几次.可以在这里共享(33Kb),但是如果您有兴趣,我可以通过电子邮件将其发送给您.
I do have a program which does this, up to a point, and which has been posted on comp.lang.postscript a few times. Its kind of large to share here (33Kb) but I can email you a copy if you are interested.