[gs-cvs] rev 8745 - trunk/gs/lib
alexcher at ghostscript.com
alexcher at ghostscript.com
Sat May 17 05:58:02 PDT 2008
Author: alexcher
Date: 2008-05-17 05:58:01 -0700 (Sat, 17 May 2008)
New Revision: 8745
Modified:
trunk/gs/lib/pdf_base.ps
trunk/gs/lib/pdf_draw.ps
trunk/gs/lib/pdf_main.ps
Log:
Ignore annotation appearance stream when it has a wrong type i.e. not a
dictionary. Bug 689839.
DIFFERENCES:
None.
Modified: trunk/gs/lib/pdf_base.ps
===================================================================
--- trunk/gs/lib/pdf_base.ps 2008-05-17 01:02:02 UTC (rev 8744)
+++ trunk/gs/lib/pdf_base.ps 2008-05-17 12:58:01 UTC (rev 8745)
@@ -470,6 +470,14 @@
} ifelse
} bind def
+/knownogetdict { % <dict> <key> knownogetdict <dict> true
+ % <dict> <key> knownogetdict false
+ //knownoget exec dup {
+ 1 index type /dicttype ne { pop pop //false } if
+ } if
+} bind def
+
+
% PDF 1.1 defines a 'foreign file reference', but not its meaning.
% Per the specification, we convert these to nulls.
/F { % <file#> <object#> <generation#> F <object>
Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps 2008-05-17 01:02:02 UTC (rev 8744)
+++ trunk/gs/lib/pdf_draw.ps 2008-05-17 12:58:01 UTC (rev 8745)
@@ -1405,7 +1405,7 @@
//false
[/N /R /D] {
% stack: scale annot appearance false key
- 2 index exch knownoget {
+ 2 index exch knownogetdict {
exch not exit
} if
} forall
@@ -1497,7 +1497,7 @@
dup /Rect known {
dup annotrect 4 -2 roll pop pop % get width height size in user space
3 -1 roll /AP knownoget {
- /N knownoget {
+ /N knownogetdict {
dup /Matrix knownoget {
% transform /Annot /Rect xwidth to Form space
4 -2 roll 3 -1 roll dtransform 3 -1 roll
Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps 2008-05-17 01:02:02 UTC (rev 8744)
+++ trunk/gs/lib/pdf_main.ps 2008-05-17 12:58:01 UTC (rev 8745)
@@ -1630,7 +1630,7 @@
//false exch % Assume no transparency
/Annots knownoget { % Get Annots array
{ oforce /AP knownoget { % Get appearance dict for the annoation
- /N knownoget { % Get the /N (i.e. normal) appearance stream
+ /N knownogetdict { % Get the /N (i.e. normal) appearance stream
4 dict exch resourceusestransparency { pop //true exit } if
} if
} if % If AP dict known
@@ -1711,7 +1711,7 @@
% annotsspotcolors <spotcolordict> <loopdict>
/annotsspotcolors {
{ oforce /AP knownoget { % Get appearance dict for the annoation
- /N knownoget { % Get the /N (i.e. normal) appearance stream
+ /N knownogetdict { % Get the /N (i.e. normal) appearance stream
resourcespotcolors
} if % If normal appearance streamknown
} if % If AP dict known
More information about the gs-cvs
mailing list