Bug 690161 - Problem with opening the some PDF files.
Summary: Problem with opening the some PDF files.
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.63
Hardware: PC Windows XP
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-07 09:17 UTC by graphman
Modified: 2008-12-30 12:50 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Problem with converting. (41.12 KB, application/pdf)
2008-11-07 09:20 UTC, graphman
Details
Problem with converting. (73.96 KB, application/pdf)
2008-11-12 02:37 UTC, graphman
Details
patch for the 1st problem. (998 bytes, patch)
2008-11-20 21:34 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description graphman 2008-11-07 09:17:18 UTC
GhostScript - latest version

Problem with opening the some PDF files. 
But file can be processed by 8.56.

How to send requested files to you?
Comment 1 graphman 2008-11-07 09:20:19 UTC
Created attachment 4584 [details]
Problem with converting.
Comment 2 Marcos H. Woehrmann 2008-11-07 14:02:42 UTC
The revision that broke this file was r7795; unfortunately the log message is useless:

------------------------------------------------------------------------
r7795 | tim | 2007-03-23 06:56:11 -0700 (Fri, 23 Mar 2007) | 1 line

Custom color hooks code merge
------------------------------------------------------------------------

and the svn diff -r7994:7995 output is 7000+ lines.
Comment 3 Marcos H. Woehrmann 2008-11-07 14:03:46 UTC
BTW, the command line I'm using for testing:

  bin/gs -sDEVICE=pbmraw -sOutputFile=test.pbm ./690161.pdf
Comment 4 Alex Cherepanov 2008-11-08 07:38:54 UTC
The PDF file is invalid. It has spurious '>>' tokens between 'endstream'
and 'endobj'.

endstream
>>
endobj

Currently, Ghostscript cannot repair this kind of damage. To repair the file
replace '>>' with 2 spaces '  ' to keep the object offsets intact.
Comment 5 graphman 2008-11-12 02:37:55 UTC
Created attachment 4594 [details]
Problem with converting.
Comment 6 Alex Cherepanov 2008-11-13 09:30:58 UTC
The file attached as the comment #5 is unrelated to the comment #1. Please file
a separate bug report next time. Fortunately the bug is easy to fix.

Add the support of null entries in /Annots array. See:
http://ghostscript.com/pipermail/gs-cvs/2008-November/008798.html

The patch is committed as a rev. 9219.
Regression testing shows no differences; we had no such files before.
Comment 7 Alex Cherepanov 2008-11-20 21:34:52 UTC
Created attachment 4611 [details]
patch for the 1st problem.

Add a check for bogus '>>' after 'endstream' to recover files generated
by 'Kroll Background Screening'.

The patch is committed as a rev. 9235.
Regression testing shows no differences.
Comment 8 graphman 2008-12-27 05:05:46 UTC
How to get new (fixed) version?
Comment 9 Marcos H. Woehrmann 2008-12-29 15:09:55 UTC
You'll have to check out a copy from the svn repository.  See http://svn.ghostscript.com/ for more 
information.
Comment 10 graphman 2008-12-30 09:49:12 UTC
I can't find the link to latest installation file (GhostScript).
Send me please.
Comment 11 Ralph Giles 2008-12-30 10:52:00 UTC
The latest release is available from
http://sourceforge.net/project/showfiles.php?group_id=1897&package_id=108733
Comment 12 graphman 2008-12-30 11:37:02 UTC
It's the old version (2008-08-01 21:38) without my requested fix.
Comment 13 Ralph Giles 2008-12-30 12:50:25 UTC
The next release is scheduled for February and should contain the fix.
Otherwise, there is enough information here to find and apply the fix yourself,
or to check out the development source code from our repository. Good luck.