Summary: | Text missing if nested BT with opdfread.ps | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | SaGS <sags5495> |
Component: | PS Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: |
Short PostScript file to demonstrate the problem.
Suggested patch. |
Description
SaGS
2007-08-26 04:23:30 UTC
Created attachment 3310 [details]
Short PostScript file to demonstrate the problem.
Steps to reproduce:
- Convert attached file using ps2write;
- Pass the ps2write output to a PS interpreter. Note the 3rd "@" is
missing.
By stripping the procset, the remaining part is a PDF that displays
correctly in both GS and Adobe Reader.
Created attachment 3311 [details]
Suggested patch.
opdfread.ps: Bracket substream execution with save/ restore of
"InitialTextMatrix"; this makes "InitialTextMatrix" stream-local, and
accounts for possible nested "BT"/"ET".
Note that saving/ restoring of "InitialTextMatrix" is not related to
"q"/ "Q". Since "q"/ "Q" do not appear inside "BT"/"ET", they do not
need to care about "InitialTextMatrix".
The problem described above still exists in current HEAD (rev 11680), so I’m going to mark the report as confirmed. The patch above still applies (the file is in Resource\Init\ and not in lib\ anymore, plus there are offsets 4/52/4 lines, but otherwise it’s OK) and fixes the bug. Adopted this patch as revision 11722 : http://ghostscript.com/pipermail/gs-cvs/2010-September/011740.html Looks good to me, thanks for your work SaGS and I apologise for taking so long to review this. |