The customer reports and I've verified that the attached PDF file generates an error when opened by Ghostscript 8.54, 8.62, and head (r8865). The command line I'm using for testing: bin/gs -sDEVICE=ppmraw -o test.ppm ./HM_TEST.pdf Output from -dPDFDEBUG: GPL Ghostscript SVN PRE-RELEASE 8.63 (2008-03-01) Copyright (C) 2008 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. << /Size 266 /Prev 1458135 /Root 205 0 R /Info 203 0 R /ID [ (\317\0225vZ!\326\243x\325\206\032\352\t\024\r) (\263\222D\302\310\220\344@\221\207l\246\312\322\\+) ] >> << /Size 204 >> %Resolving: [205 0] << /Metadata 202 0 R /Pages 201 0 R /Type /Catalog >> endobj %Resolving: [201 0] << /Count 6 /Type /Pages /Kids [ 206 0 R 1 0 R 21 0 R 36 0 R 75 0 R 164 0 R ] >> endobj %Resolving: [205 0] %Resolving: [205 0] %Resolving: [205 0] %Resolving: [201 0] Processing pages 1 through 6. Page 1 %Resolving: [205 0] %Resolving: [201 0] %Resolving: [206 0] << /CropBox [ 0 0 297.638 595.276 ] /Parent 201 0 R /Contents [ 215 0 R 216 0 R 217 0 R 218 0 R 219 0 R 220 0 R 221 0 R 223 0 R ] /Rotate 0 /BleedBox [ 0 0 297.638 595.276 ] /MediaBox [ 0 0 297.638 595.276 ] /TrimBox [ 0 0 297.638 595.276 ] /Resources 207 0 R /Type /Page >> endobj %Resolving: [206 0] %Resolving: [206 0] %Resolving: [206 0] %Resolving: [206 0] %Resolving: [207 0] << /XObject << /XO1 243 0 R /XO2 222 0 R /XO3 248 0 R /XO4 250 0 R /XO5 252 0 R /XO6 254 0 R /XO7 256 0 R >> /ColorSpace << /Cs1 209 0 R /Cs2 210 0 R >> /Font << /F2 208 0 R >> /ProcSet [ /PDF /Text /ImageC /ImageI ] /Properties << /MC10 261 0 R /MC9 264 0 R >> /ExtGState << /GS1 212 0 R /GS2 213 0 R /GS3 214 0 R >> >> endobj %Resolving: [210 0] [ /Separation /Black /DeviceCMYK 225 0 R ] endobj %Resolving: [209 0] /DeviceRGB endobj %Resolving: [250 0] << /Subtype /Image /Intent /RelativeColorimetric /Length 9415 /Filter /DCTDecode /BitsPerComponent 8 /ColorSpace 209 0 R /Width 229 /DecodeParms << /CALS_Rows 214 /CALS_Columns 229 /CALS_Quality 50 /CALS_BytesPerComponent 3 >> /Height 214 /Type /XObject >> stream %FilePosition: 510060 endobj %Resolving: [222 0] << /Subtype /Image /Length 290383 /Filter /FlateDecode /BitsPerComponent 8 /ColorSpace 232 0 R /Width 624 /Height 1244 /Type /XObject >> stream %FilePosition: 31168 endobj %Resolving: [252 0] << /Subtype /Image /Intent /RelativeColorimetric /Length 22193 /Filter /DCTDecode /BitsPerComponent 8 /ColorSpace 209 0 R /Width 391 /DecodeParms << /CALS_Rows 214 /CALS_Columns 391 /CALS_Quality 50 /CALS_BytesPerComponent 3 >> /Height 214 /Type /XObject >> stream %FilePosition: 519770 endobj %Resolving: [254 0] << /Subtype /Image /Intent /RelativeColorimetric /Length 9819 /Filter /DCTDecode /BitsPerComponent 8 /ColorSpace 209 0 R /Width 161 /DecodeParms << /CALS_Rows 214 /CALS_Columns 161 /CALS_Quality 50 /CALS_BytesPerComponent 3 >> /Height 214 /Type /XObject >> stream %FilePosition: 542256 endobj %Resolving: [243 0] << /Subtype /Image /Length 7950 /Filter /FlateDecode /BitsPerComponent 8 /ColorSpace 242 0 R /Width 13 /Height 1255 /Type /XObject >> stream %FilePosition: 495563 endobj %Resolving: [256 0] << /Subtype /Image /Intent /RelativeColorimetric /Length 8516 /Filter /DCTDecode /BitsPerComponent 8 /ColorSpace 209 0 R /Width 182 /DecodeParms << /CALS_Rows 214 /CALS_Columns 182 /CALS_Quality 50 /CALS_BytesPerComponent 3 >> /Height 214 /Type /XObject >> stream %FilePosition: 552368 endobj %Resolving: [248 0] << /Subtype /Image /Intent /RelativeColorimetric /Length 5893 /Filter /DCTDecode /BitsPerComponent 8 /ColorSpace 209 0 R /Width 184 /DecodeParms << /CALS_Rows 214 /CALS_Columns 184 /CALS_Quality 50 /CALS_BytesPerComponent 3 >> /Height 214 /Type /XObject >> stream %FilePosition: 503874 endobj %Resolving: [207 0] %Resolving: [214 0] << /OPM 1 /OP false /BG2 /Default /op false /Type /ExtGState /SA true /UCR2 /Default /SM 0.020004 >> endobj %Resolving: [213 0] << /OPM 1 /OP false /op false /Type /ExtGState >> endobj %Resolving: [212 0] << /OPM 1 /OP false /BG2 /Default /op false /Type /ExtGState /SA false /UCR2 /Default /SM 0.020004 >> endobj %Resolving: [250 0] %Resolving: [222 0] %Resolving: [252 0] %Resolving: [254 0] %Resolving: [243 0] %Resolving: [256 0] %Resolving: [248 0] %Resolving: [201 0] %Resolving: [207 0] %Resolving: [207 0] %Resolving: [207 0] %Resolving: [207 0] %Resolving: [214 0] %Resolving: [213 0] %Resolving: [212 0] %Resolving: [250 0] %Resolving: [222 0] %Resolving: [252 0] %Resolving: [254 0] %Resolving: [243 0] %Resolving: [256 0] %Resolving: [248 0] %Resolving: [201 0] %Resolving: [215 0] << /Length 3649 /Filter /FlateDecode >> stream %FilePosition: 4489 endobj q q 1 i 0.029999 595.26 4.8294 -595.26 re W n /GS1 gs %Resolving: [207 0] %Resolving: [212 0] q -6.06207323 0 0 596.471924 5.42854309 -0.605957 cm /GS2 gs %Resolving: [207 0] %Resolving: [213 0] /XO1 Do %Resolving: [207 0] %Resolving: [243 0] %Resolving: [242 0] [ /Indexed [ /DeviceN [ /Cyan /Magenta /Yellow /Black /PANTONE 877 C ] /DeviceCMYK 235 0 R << /Subtype /DeviceN /Colorants << /Cyan [ /Separation /Cyan /DeviceCMYK 236 0 R ] /Magenta [ /Separation /Magenta /DeviceCMYK 237 0 R ] /Yellow [ /Separation /Yellow /DeviceCMYK 238 0 R ] /Black [ /Separation /Black /DeviceCMYK 239 0 R ] /PANTONE 877 C [ /Separation /PANTONE 877 C /DeviceCMYK 241 0 R ] >> >> ] 96 (\000\000\000\000,\000\000\000\000- \000\000\000\000.\000\000\000\000/\000\000\000\000+\000\000\000\000*\000\000\000\000 \)\000\000\000\0002\000\000\000\0003\000\000\000\0001\000\000\000\0004\000\000\000\0 000\000\000\000\000\(\000\000\000\000'\000\000\000\0005\000\000\000\0006\000\000\000 \000;\000\000\000\000:\000\000\000\0009\000\000\000\0008\000\000\000\0007\000\000\00 0\000? \000\000\000\000>\000\000\000\000=\000\000\000\000<\000\000\000\000&\000\000\000\0 00%\000\000\000\000$\000\000\000\000@\000\000\000\000A\000\000\000\000B\000\000\00 0\000C\000\000\000\000D\000\000\000\000E\000\000\000\000F\000\000\000\000H\000\000\ 000\000G\000\000\000\000J\000\000\000\000I\000\000\000\000L...) ] endobj %Resolving: [235 0] << /Length 77804 /FunctionType 0 /Filter /FlateDecode /BitsPerSample 8 /Domain [ 0 1 0 1 0 1 0 1 0 1 ] /Size [ 9 9 9 9 9 ] /Order 1 /Range [ 0 1 0 1 0 1 0 1 ] >> stream %FilePosition: 415926 endobj Error: /limitcheck in --run-- Operand stack: --nostringval-- --dict:10/19(L)-- --dict:10/18(L)-- Indexed 96 (\000\000\000\000,\000\000\000\000- \000\000\000\000.\000\000\000\000/\000\000\000\000+\000\000\000\000*\000\000\000\000 \)\000\000\000\0002\000\000\000\0003\000\000\000\0001\000\000\000\0004\000\000\000\0 000\000\000\000\000\(\000\000\000\000'\000\000\000\0005\000\000\000\0006\000\000\000 \000;\000\000\000\000:\000\000\000\0009\000\000\000\0008\000\000\000\0007\000\000\00 0\000? \000\000\000\000>\000\000\000\000=\000\000\000\000<\000\000\000\000&\000\000\000\0 00%\000\000\000\000$\000\000\000\000@\000\000\000\000A\000\000\000\000B\000\000\00 0\000C\000\000\000\000D\000\000\000\000E\000\000\000\000F\000\000\000\000H\000\000\ 000\000G\000\000\000\000J\000\000\000\000I\000\000\000\000L...) --nostringval-- -- nostringval-- 6537 --dict:10/11(L)-- --nostringval-- 236196 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push - -nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- -- nostringval-- 2 1 6 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- - -nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push -- nostringval-- %loop_continue --nostringval-- 6537 --nostringval-- --nostringval-- -- nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval- - --nostringval-- --nostringval-- Dictionary stack: --dict:1148/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- -- dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- -- dict:22/40(L)-- --dict:1/1(ro)(G)-- --dict:3/5(L)-- --dict:3/5(L)-- --dict:5/16(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript SVN PRE-RELEASE 8.63: Unrecoverable error, exit code 1 marcos@macbookpro:[4]%
Created attachment 4234 [details] HM_TEST.pdf
Use reusable stream when the data stream of type 0 function doesn't fit into a string. The following patch has been committed as a rev. 8875. Regression testing shows no differences. A sample file that exercises handling of data streams larger than 64K is added to the regression test suite by rev. 8876.
The patch: http://ghostscript.com/pipermail/gs-cvs/2008-July/008454.html Restore P2 priority, which was reset by a Bugzilla bug.