1
I'm trying to reduce the file size of a PDF using GhostScript. Generally, this works:
gswin32c -sDEVICE=pdfwrite -sOutputFile=out.pdf in.pdf
I think it gets rid of bookmarks, annotations, etc.
On some PDFs, I end up with a blank PDF. I get the following output:
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /rangecheck in --run--
Operand stack:
15 0 15 --nostringval-- 15
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 --nostringval-- --nostringval-- --nostri
ngval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1166/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82
/200(L)-- --dict:108/127(ro)(G)-- --dict:291/300(ro)(G)-- --dict:22/30(L)-
-
Current allocation mode is local
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
The error message is not particularly helpful. Any suggestions how to troubleshoot this problem?
KenS, I tried using
epswriteandpswrite; I didn't get any errors from GS. I'm not sure what you mean by starting GS without any arguments, but I did drag and drop the PDF on GS. It launched a window and I could see the PDF properly (same as what I would see in Acrobat).I also ran
-dPDFDEBUG, but didn't see anything out of the ordinary (though I must admit the output was very cryptic). The only thing that hints to an error is this:Error: /rangecheck in --run--. However, that was in my original post anyway.I'll post a bug report. Thanks. – None – 2011-09-29T22:05:36.817