The customer reported and I've verified that Ghostscript 9.00 and later versions produce an output file with only two pages before producing an error: . . . **** Warning: Outline has invalid link that was discarded. **** Warning: Outline has invalid link that was discarded. **** Warning: Outline has invalid link that was discarded. Processing pages 1 through 11. Page 1 Loading NimbusSanL-Bold font from %rom%Resource/Font/NimbusSanL-Bold... 3949272 2608374 2932520 1629526 3 done. Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 4063288 2732835 2952704 1645770 3 done. Page 2 Loading NimbusRomNo9L-Regu font from %rom%Resource/Font/NimbusRomNo9L-Regu... 4265976 2932777 3134360 1821058 3 done. Page 3 Error: /rangecheck in 12 Operand stack: --dict:9/18(L)-- --nostringval-- --nostringval-- Rect --nostringval-- Border --nostringval-- --dict:5/5(L)-- --nostringval-- --nostringval-- 0 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 --nostringval-- --nostringval-- 4 1 11 --nostr ingval-- %for_pos_int_continue --nostringval-- --nostringval-- 11 1 37 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --n ostringval-- Dictionary stack: --dict:1160/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:108/127(ro)(G)-- --dict:292/300(ro)(G)-- --dict:23/30(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript GIT PRERELEASE 9.03: Unrecoverable error, exit code 1 GPL Ghostscript GIT PRERELEASE 9.03: ERROR: A pdfmark destination page 11 points beyond the last page 2. GPL Ghostscript GIT PRERELEASE 9.03: Unrecoverable error, exit code 1 Ghostscript versions before 410f6cf8ac98aeb66459e3ecb495e3f1024a47e9 fail with a different error message but produce the correct output. There is the command line the customer is using: gswin32c -sDEVICE=pdfwrite -o out.pdf -dFirstPage=1 -dLastPage=11 SampleTest.pdf
Created attachment 7499 [details] SampleTest.pdf
Created attachment 7500 [details] patch Execute linkdest procedure in a stopped context to trap errors caused by out-of-range link destinations that can occur in an invalid files or during processing of a page range.
(In reply to comment #2) > Created an attachment (id=7500) [details] > patch > > Execute linkdest procedure in a stopped context to trap errors caused > by out-of-range link destinations that can occur in an invalid files or > during processing of a page range. Alex committed this patch in g0f59283: http://ghostscript.com/pipermail/gs-cvs/2011-May/012884.html Alex, should we close this bug ? (Thanks for looking at it by the way)