GSWin: How to convert XPS to PDF?
I have XPS file that is needed to be converted to PDF. I'm trying to use GSWin tool. But I cannot, I don't know why. The command line is:
C:\Windows\system32>"C:\Program Files (x86)\gs\gs9.04\bin\gswin32c.exe" sOutputFile="c:\temp\test2.pdf" -sDEVICE=pdfwrite -dNOPAUSE "C:\TEMP\test2.xps"
The output is:
Error: /undefined in PK♥
Operand stack:
Execution stack: %interp_exit .runexec2 --nostringval--
--nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push 1926 1 3 %oparray_pop 1925 1 3 %oparray_ pop 1909 1 3 %oparray_pop 1803 1 3 %oparray_pop --nostringval- - %errorexec_pop .runexec2 --nostringval-- --nost开发者_如何学编程ringval-- --nostringv al-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1165/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Current file position is 3 GPL Ghostscript 9.04: Unrecoverable error, exit code 1
I don't understand it and don't know how to make it work. I suppose I use it improper but I'm not sure how to fix it.
Thanks!
Ghostscript (gswin32.exe) only accepts PostScript or PDF as an input, so you can't use it to deal with XPS. You need another member of the family, GhostXPS (gxps.exe), which accepts XPS as an input. There is also GhostPCL (pxl6.exe) which accepts PCL as an input.
All the family members are available under GPL and can be downloaded from the Ghostscript downloads site:
http://www.ghostscript.com/download/
精彩评论