[gs-cvs] rev 8875 - trunk/gs/lib
alexcher at ghostscript.com
alexcher at ghostscript.com
Thu Jul 24 18:10:39 PDT 2008
Author: alexcher
Date: 2008-07-24 18:10:39 -0700 (Thu, 24 Jul 2008)
New Revision: 8875
Modified:
trunk/gs/lib/pdf_draw.ps
Log:
Use reusable stream when the data stream of type 0 function doesn't fit into
a string. Bug 689978, customer 770.
DIFFERENCES:
None
Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps 2008-07-24 17:28:51 UTC (rev 8874)
+++ trunk/gs/lib/pdf_draw.ps 2008-07-25 01:10:39 UTC (rev 8875)
@@ -54,13 +54,18 @@
% Don't lose our place in PDFfile.
PDFfile fileposition exch
- dup true resolvestream
+ dup //true resolvestream
% The stream isn't positionable, so read all the data now.
% Stack: filepos fndict stream
1 index /Range get length 2 idiv 2 index /BitsPerSample get mul
2 index /Size get { mul } forall
- 7 add 8 idiv string
- 1 index exch readstring pop exch closefile
+ 7 add 8 idiv
+ dup 65535 le {
+ string 1 index exch readstring pop
+ } {
+ 1 index exch () /SubFileDecode filter /ReusableStreamDecode filter
+ } ifelse
+ exch closefile
% Stack: filepos fndict data
exch dup /DataSource 4 -1 roll put
exch PDFfile exch setfileposition
More information about the gs-cvs
mailing list