Fix for 686953, Indirect object references in Form XObjects fail (PDF)
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Dereference indirect objects during conversion from PDF form XObject to PostScript form. Fix bug 686953. This problem has been already fixed independently from this bug report but the proposed patch is more efficient. _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
pdf_draw.ps.diff
(text/plain, 1.1 KB)
Index: gs/lib/pdf_draw.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_draw.ps,v
retrieving revision 1.78
diff -b -u -r1.78 pdf_draw.ps
--- gs/lib/pdf_draw.ps 16 Oct 2003 11:15:05 -0000 1.78
+++ gs/lib/pdf_draw.ps 21 Oct 2003 23:00:57 -0000
@@ -966,21 +966,11 @@
/DoForm {
% Adobe 2nd edition of the PDF 1.3 spec makes /FormType
% and /Matrix keys optional. Cope with the missing keys.
- dup length
- 1 index /Matrix known
- { dict
- }
- { 1 add dict
- dup /Matrix { 1 0 0 1 0 0 } cvlit put
- }
- ifelse
- copy
- dup /FormType known not {
- dup length 1 add dict copy dup /FormType 1 put
- } if
-
- % now we need to resolve any indirect objects for execform
- << exch { oforce } forall >>
+ begin <<
+ currentdict /FormType known not { /FormType 1 } if
+ currentdict /Matrix known not { /Matrix { 1 0 0 1 0 0 } cvlit } if
+ currentdict end { oforce } forall
+ >>
dup [ 2 index /Resources knownoget { oforce } { 0 dict } ifelse
3 index false /resolvestream cvx
/.paintform cvx