Bug 696541

Summary: ps2pdf fails (typecheck) on a file that can be opened by some other viewers
Product: Ghostscript Reporter: Tomasz Kuchta <t.kuchta>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: major    
Priority: P4    
Version: 9.16   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: 477165.pdf

Description Tomasz Kuchta 2016-01-25 06:58:35 UTC
ps2pdf fails on a document that can be opened e.g. by evince.

The file is "477165.pdf", from Govdocs1 data set (http://digitalcorpora.org/corpora/govdocs)

The file can be found in the following archive: http://digitalcorpora.org/corp/files/govdocs1/zipfiles/477.zip

The program output is 
   **** Error reading a content stream. The page may be incomplete.
Error: /typecheck in --run--
Operand stack:
   30693   1   0   Creator   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1967   1   3   %oparray_pop   1966   1   3   %oparray_pop   1950   1   3   %oparray_pop   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1191/1684(ro)(G)--   --dict:1/20(G)--   --dict:83/200(L)--   --dict:83/200(L)--   --dict:117/127(ro)(G)--   --dict:280/300(ro)(G)--   --dict:26/32(L)--
Current allocation mode is local
GPL Ghostscript 9.16: Unrecoverable error, exit code 1
 

That was tested on Ubuntu 15-10

I would be grateful if you could confirm the problem.

Kind regards,
Tomasz
Comment 1 Ken Sharp 2016-01-25 09:22:48 UTC
OK firstly please try and test with the current code where possible, the current release is 9.18

Please *attach* files, don't post a URL, it happens quite frequently that URLs go stale before anyone has a chance to examine the problem.

Finally, you have bot supplied the command line you are using, we'll need that in order to reproduce any problem.
Comment 2 Marcos H. Woehrmann 2016-01-25 09:30:42 UTC
Created attachment 12263 [details]
477165.pdf
Comment 3 Marcos H. Woehrmann 2016-01-25 09:33:09 UTC
This fails with 9.18 and the current commit with the pdfwrite device but works with ppmraw.
Comment 4 Marcos H. Woehrmann 2016-01-25 09:50:12 UTC
This is a regression, commits before d5c42d3a14cee808fd889c14805a69adae8eb5b9 convert the file without error.
Comment 5 Ken Sharp 2016-01-26 07:47:32 UTC
Fixed in commit 704617563f8640f6b229ffd65185f79efb0ae195

The PDF file is invalid, it contains illegal strings in the Info dictionary, which is why you get an error. Notice that Acrobat does not display any Info.
Comment 6 Tomasz Kuchta 2016-01-26 08:11:17 UTC
Thank you very much for a very quick response, explanation and a fix!