Bug 691836 - ps2write (NOT pdfwrite) produces invalid output for some files
Summary: ps2write (NOT pdfwrite) produces invalid output for some files
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: master
Hardware: PC Windows Vista
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 14:55 UTC by Ken Sharp
Modified: 2011-02-02 13:35 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Sharp 2010-12-14 14:55:09 UTC
0000626-Q5471Untitled1.ps, 000516-1.pdf, 02 (2).pdf, 02.pdf, 02ok_11h.pdf, 067a.pdf, 159.pdf, 200200697.pdf, 24_25.ps, 55550j.pdf, 9-11.pdf, Accelrys Track Signs A1_UK_PR.pdf, Altona.Page_3.2002-09-27.pdf, Altona.pdf, AltonaTech_1v2_pt2com_x3.pdf, Altona_Technical_1v1_x3.pdf, altona_technical_1v2_x3.pdf, Altona_Technical_x3.pdf, Altona_Technical_x3stripped.pdf, ALWA SYSTEM MAPS.pdf, annoncesonder0105m.pdf, apple -- intervention jaussaud 6.pdf, BCL easy.pdf, BFAZHHPD.PDF, Bug687603.ps, Bug687724.pdf, Bug687901.ps, Bug688421.pdf, Bug688467.ps, Bug688778.pdf, Bug689014.pdf, Bug689083.pdf, Bug689369.pdf, Bug689492.pdf, Bug689516.pdf, Bug689754.ps, Bug689895.pdf, Bug689918.pdf, Bug689962.pdf, Bug689982.pdf, Bug690022.pdf, Bug690348.pdf, Bug690450.pdf, Bug690478.pdf, bug_687457.pdf, C262-PSCutDown.ps, CATX0198.pdf, CATX2376.pdf, CATX2579.pdf, CATX2975.pdf, CATX3506.pdf.disabled, CATX3740.pdf, CATX4030.pdf, CATX4135.pdf, CATX5185.pdf, CATX6460.pdf, CATX8434.pdf, CATX8839.pdf, CATX9201.pdf, endless20040109.ps, err_file.pdf, err_file.ps, err_file0.pdf, Faktura.pdf, FT601DP1.PS, IA3Z0248.pdf, IA3Z0658.pdf, IA3Z1351.pdf, IA3Z3778.pdf, IA3Z4488.pdf, IA3Z4630.pdf, IE553CP1.pdf, IE553CP1.ps, IE554CP1.ps, INTEGER_TEST_5COLOR_PS2_-output.pdf, LP20_020-1.pdf, Murphys_trap_limecmyk2.pdf, objlune-notext.pdf, Pages from AC507122.pdf, Pages from BFAZHHPD.pdf, patterntest.ps, PDFEditorSDK2.4.SDP.20040603.pdf, PolorLogoCirc_greenV9.pdf, pscharstrings5.ps, Quiberon A0.pdf, raapke.prn, rotate.pdf, S2_Digitalproof-Forum_x3k.pdf, Sal_afrek_100_1_20050201.pdf, SolimarCR3324.ps, source.ps, test_multipage_prob.pdf, Tran_30-1-unc.pdf, Tran_30-2-unc.pdf, Tran_30-3-unc.pdf, Tran_30-4-unc.pdf, Tran_30-5-unc.pdf, Tran_30.pdf, tsts.objects copy 1.ps, tsts.objects copy 11.ps, TT2029.pdf, type42_glyph_index.ps, WD0010L0.pdf, zweiseit01d4-1.pdf

All these files (from my test suite of 2700 problem files) either produce output which causes a PostScript error, or produce an error while being processsed with Ghostscript and the ps2write device. These are not regressions, I've been meaning to document these for some time.
Comment 1 Ken Sharp 2010-12-20 12:44:44 UTC
Analysis of the errors shows:

FAPI+FreeType issue see Bug #691848
-------------------------------------
0000626-Q5471Untitled1.ps, 000516-1.pdf, 067a.pdf, 159.pdf, 24-25.ps, 55550j.pdf, 9-11.pdf, Altona.Page_3.2002-09-27.pdf, Altona.pdf, AltonaTech_1v2_pt2com_x3.pdf, Altona_Technical_1v1_x3.pdf, altona_technical_1v2_x3.pdf, Altona_Technical_x3.pdf,
Altona_Technical_x3stripped.pdf, ALWA SYSTEM MAPS.pdf, annoncesonder0105m.pdf, apple -- intervention jaussaud 6.pdf, BCL easy.pdf, BFAZHHPD.PDF, bug687603.ps, Bug687724.pdf, Bug687901.ps, Bug688421.pdf, Bug688467.ps, Bug689014.pdf, Bug689083.pdf, Bug689516.pdf, Bug689754.ps, Bug689962.pdf, Bug690348.pdf, Bug690450.pdf, Bug690478.pdf, bug_687457.pdf, C262-PSCutDown.ps, CATX0198.pdf, CATX2376.pdf, CATX2579.pdf, CATX2975.pdf, CATX3740.pdf, CATX4030.pdf, CATX4135.pdf, CATX5185.pdf, CATX6460.pdf, CATX8839.pdf, CATX9201.pdf, endless20040109.ps, err_file.pdf, err_file.ps, err_file0.pdf, Faktura.pdf, FT601DP1.PS, IA3Z0248.pdf, IA3Z0658.pdf, IA3Z1351.pdf, IA3Z3778.pdf, IA3Z4488.pdf, IA3Z4630.pdf, IE553CP1.pdf, IE553CP1.ps, IE554CP1.ps, LP20_020-1.pdf, objlune-notext.pdf, Pages from BFAZHHPD.pdf, PDFEditorSDK2.4.SDP.20040603.pdf, pscharstrings5.ps, Quiberon A0.pdf, raapke.prn, rotate.pdf, S2_Digitalproof-Forum_x3k.pdf, Sal_afrek_100_1_20050201.pdf, SolimarCR3324.ps, source.ps, test_multipage_prob.pdf, TT2029.pdf, type42_glyph_index.ps

memory errors caused by transparency see Bug #689805.
-------------------------------------------------------
02 (2).pdf, 02.pdf, 02ok_11h.pdf 200200697.pdf, Accelrys
Track Signs A1_UK_PR.pdf, Bug688778.pdf, Bug689369.pdf, Bug689492.pdf, Bug689895.pdf, Bug689918.pdf, Bug689982.pdf, Bug690022.pdf, INTEGER_TEST_5COLOR_PS2_-output.pdf, Murphys_trap_limecmyk2.pdf, PolorLogoCirc_greenV9.pdf, Tran_30-1-unc.pdf, Tran_30-2-unc.pdf, Tran_30-3-unc.pdf, Tran_30-4-unc.pdf, Tran_30-5-unc.pdf, Tran_30.pdf

CATX3506.pdf.disabled, uses a CIDFont, which is not embedded, needs a defined replacement, this not a bug.

This leaves the following files still needing further investigation
--------------------------------------------------------------------- 
Pages from AC507122.pdf, nocurrentpoint in --run--, works OK with non-FAPI GS.

tsts.objects copy 1.ps, tsts.objects copy 11.ps, patterntest.ps rangecheck in --rectfill-- during conversion to ps2write. 

zweiseit01d4-1.pdf, limitcheck --nostringval--
Comment 2 Ken Sharp 2010-12-20 14:33:03 UTC
patterntest.ps contains a pattern which uses a DeviceN colour space. Since DeviceN is a level 3 construct this is why we get a rangecheck.

Use of DeviceN also causes the rangecheck errors in tsts.objects copy 1.ps and tsts.objects copy 11.ps.
Comment 3 Ken Sharp 2010-12-22 14:01:36 UTC
revision 11969 fixes the problem with zweiseit01d4-1.pdf. When rendering a font to bitmaps in order to construct a type 3 bitmap font (in this case as a replacement for a CFF font), glyphs which had already been cached were not updating the show enumerator with the glyph width. 

However, the width was being used to set the /Widths array for the type 3 font. Using the uninitialised value from the show enumerator could lead to random garbage values in the Widths array, which caused the error. We now update the show enumerator 'wxy' value from the cached character 'wxy' value.
Comment 4 Ken Sharp 2011-02-02 13:35:14 UTC
The remaining file is a duplicate of the problem raised in bug #691927, we'll continue with that bug and close this one as all the other problems in this report are fixed.