Article View: adobe.postscript.programming
Article #103Re: problem caching EPS files with multiple forms
From: Mike_Moening
Date: Mon, 27 Oct 2008 21:37
Date: Mon, 27 Oct 2008 21:37
32 lines
1768 bytes
1768 bytes
I found the problem.
The filter is automatically closed at the end of /readdata the 1st time you execute it.
If you call readdata again (with a second EPS file) it returns NULL and executes the postscript bytes in the 2nd EPS file instead of reading them into the string buffer.
The solution involves moving the define of the filter inside of the /readdata procedure.
OLD CODE:
-----------------------------------------
/buffer 16000 string def
/inputFile currentfile 0 (% $$EPS_EOD_Marker$$) /SubFileDecode filter def
/readdata { % array readdata --
1 { % put counter on stack
---------------------------------------------
FIXED CODE:
-----------------------------------------
/buffer 16000 string def
/readdata { % array readdata --
/inputFile currentfile 0 (% $$EPS_EOD_Marker$$) /SubFileDecode filter def
1 { % put counter on stack
---------------------------------------------
Looks like Technical Note #5144 could use a little updating!
I found this bug using the Postscript debugger PSAlter
The tool is a few years old but it works great!!
Mike M.
Technical Details
Message-ID:
<59b6d561.1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed.straub-nv.de!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossingReferences:
<59b6d561.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,2b80b6b760c12862 X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Mike_Moening@adobeforums.com Newsgroups: adobe.postscript.programming Subject: Re: problem caching EPS files with multiple forms Message-ID: <59b6d561.1@webcrossing.la2eafNXanI> Date: Mon, 27 Oct 2008 14:37:32 -0700 References: <59b6d561.-1@webcrossing.la2eafNXanI> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed.straub-nv.de!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing