Summary: | Error: /rangecheck in --run-- | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 353 | Word Size: | --- |
Attachments: | patch |
Description
Marcos H. Woehrmann
2011-05-02 15:29:23 UTC
Here's the very terse -dPDFDEBUG output: marcos@macbookpro:[33]% gsheadppm -dPDFDEBUG ./Original.pdf GPL Ghostscript GIT PRERELEASE 9.03 (2011-03-30) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. << /Size 1622 /Info 2 0 R /Root 1 0 R /Prev 2193476 /ID [ (\207"/\230\016\272\265\\H\(\353\032,A\342\270) (\207"/\230\016\272\265\\H\(\353\032,A\342\270) ] /Lambkin (ccbadhe) >> **** Warning: An error occurred while reading an XREF table. **** The file has been damaged. This may have been caused **** by a problem while converting or transfering the file. **** Ghostscript will attempt to recover the data. %Resolving: [1 0] Error: /rangecheck in --run-- Operand stack: 1 0 1 --nostringval-- 1 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1152/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:108/127(ro)(G)-- --dict:295/300(ro)(G)-- --dict:21/30(L)-- Current allocation mode is local GPL Ghostscript GIT PRERELEASE 9.03: Unrecoverable error, exit code 1 Exit 1 marcos@macbookpro:[34]% As of 45bf62dc4e7271c25ee53e1e2ce0de51955132de this file now works in mupdf: pdf_repair.c: Skip first comment after version marker. Some particularly broken generators forget to terminate the comment with a newline. Skip the comment character so we'll get some garbage tokens that we can ignore, rather than consuming the innocent objects that follow on the same line as the %. Ghostscript can run the file if "xref 0 837 0000000000 65535 f 0000124513 00000 n ..." is replaced with "xref 0 837" "0000000000 65535 f 0000124513 00000 n ..." Of course, xref should be terminated by a new line but gs can handle this. The sample file produced by "pcl convert 2.10" is full of bugs. Perhaps, there are better tools to convert PCL to PDF. Created attachment 7486 [details]
patch
Accept and skip any number of whitespace characters (including just spaces)
after the entry count in the xref table. Remove /lineeq and /linene procedures
that are no longer used.
The patch has been committed as a rev. 2f0b609805f1abf42b4b10dd721d9fef3001a847 |