Bug 690449

Summary: incomplete rendering of PDF
Product: Ghostscript Reporter: artifex
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 8.64   
Hardware: PC   
OS: Windows XP   
Customer: 870 Word Size: ---

Description artifex 2009-04-27 04:42:58 UTC
the attached file 1.pdf is rendered incomplete when viewing or generating TIFF
with the Ghostscript. The AcrobatReader displays the complete drawing.

The following warning is shown:

Page 1
   **** Warning: File has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> PDF Xpansion 5.5.1 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
Comment 1 artifex 2009-04-27 04:43:43 UTC
Created attachment 4974 [details]
1.pdf
Comment 2 Alex Cherepanov 2009-04-30 10:43:25 UTC
Ghostscript correctly detects that q/Q operators are not balanced
but does it at the end of the job. We need enforce the balance
for every form stream.
Comment 3 Alex Cherepanov 2009-04-30 20:42:25 UTC
Check for unbalanced q/Q operators in content streams of PDF forms.
Add missing Q when needed and issue a warning. 

The following patch has been committed as a rev. 9716.
http://ghostscript.com/pipermail/gs-cvs/2009-April/009302.html
Regression testing shows no differences.
Comment 4 Marcos H. Woehrmann 2011-09-18 21:46:55 UTC
Changing customer bugs that have been resolved more than a year ago to closed.