Bug 690709 - PDF file causes /syntaxerror on Linux, parses fine on Windows
Summary: PDF file causes /syntaxerror on Linux, parses fine on Windows
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.70
Hardware: PC Linux
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-17 13:03 UTC by Kevin Klein
Modified: 2009-08-19 09:36 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
temp_48110.pdf (62.19 KB, application/pdf)
2009-08-17 13:03 UTC, Kevin Klein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Klein 2009-08-17 13:03:01 UTC
Trying to process a PDF file fails on Linux with "Error: /syntaxerror in pdfopen".

Same file processes fine on the Windows XP platform.

Command line is:

gs -dNOPAUSE -dBATCH -r72 -sDEVICE=png16m -sOutputFile=test-%03d.png  temp_48110.pdf
Comment 1 Kevin Klein 2009-08-17 13:03:35 UTC
Created attachment 5303 [details]
temp_48110.pdf

Sample file
Comment 2 Marcos H. Woehrmann 2009-08-17 22:05:18 UTC
This is a regression, gs8.64 processes the file without error.  The responsible
change:

r9826 | alexcher | 2009-06-29 17:06:33 -0700 (Mon, 29 Jun 2009) | 6 lines

Extract all documents from PDF collection to temporary files and process them
in the order they are listed in the /Names array. Bug 690422, customer 531.
Comment 3 Alex Cherepanov 2009-08-18 05:13:18 UTC
Unfortunately, I don't know how to tell PDF collections from
ordinary PDF files with attachments.

One possible approach is to test whether the attached file is PDF
by searching for the PDF header.
Comment 4 Alex Cherepanov 2009-08-19 09:33:22 UTC
I misunderstood the spec. Collection attribute is marked in the spec as
optional because a PDF file need not to be a portable collection but
every collection has /Collection attribute.

So this patch processes embedded files as a portable collection only
when /Collection attribute is defined in the document root and ignores
them otherwise.

The following patch has been committed as a rev. 10008.
http://ghostscript.com/pipermail/gs-cvs/2009-August/009714.html
Regression testing shows no differences.

Regarding Windows vs Linux differences, the patch is platform-independent 
and the bug shows up on Windows too. Most likely, you are using an old
version of Ghostscript on Windows.
Comment 5 Kevin Klein 2009-08-19 09:36:53 UTC
re: Windows vs. Linux

You are correct, Windows version was 8.64, Linux was 8.70.