Summary: | PDF interpreter needs languagelevel 3, not 2 | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | SaGS <sags5495> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: | Recommended minimum patch. |
Description
SaGS
2005-06-21 11:25:17 UTC
Created attachment 1460 [details] Recommended minimum patch. The patch modifies only pdfwrite.ps to save/ restore the languagelevel. The question at which languagelevel is the PDF interpreter supposed to run, and what should happen if a lower languagelevel is in effect, remains. The answer depends in part on the outcome of bug #688150 "ReusableStreamDecode available but failing at languagelevel 2" (more precisely, if LL3 filters remain available at LL2). --- Changing the other 5 files is more problematic. If they do a save/ restore of the languagelevel, subsequent INITFILES are parsed at LL1. Some of these incorrectly omit setting LL2 even if they need it. I found such problems with the following: gs_cff.ps: In line #70 "30 dict begin" the dict size is insufficient (needs 53 or more); at LL1, fails with "Error: /dictfull in def". gs_dpnxt.ps: Calls "(current|set)global" (without a leading dot) in 3 places. I recommend using ".(current|set)global" (with a dot). gs_epsf.ps, gs_icc.ps, gs_pdfwr.ps: Use "<< .. >>", failing with a syntaxerror at LL1. In addition to these problems, when loading those files at LL1 some operators are not available and won't be bound into the procedures. Passing to Alex who owns the PDF interpreter. The minimal patch, dictionary size change, and dotted (current|set)global operators are adopted and committed as a rev. 9246. I didn't replace '<< >>' operators because this would reduce readability. The start-up files are not expected to be loaded in level 1 mode. |