[gs-cvs] rev 7615 - trunk/gs/lib
ray at ghostscript.com
ray at ghostscript.com
Wed Jan 17 11:59:37 PST 2007
Author: ray
Date: 2007-01-17 11:59:36 -0800 (Wed, 17 Jan 2007)
New Revision: 7615
Modified:
trunk/gs/lib/pdf_draw.ps
trunk/gs/lib/pdf_main.ps
Log:
Fix for (yet another) a PDF file that does not meet Adobe's PDF spec,
but Adobe Reader opens silently. In this case there is an Annotation
that is missing the required /N (Normal Appearance) entry. Bug 689045
for customer 531. Thanks to "SaGS" for this fix.
Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps 2007-01-17 06:09:38 UTC (rev 7614)
+++ trunk/gs/lib/pdf_draw.ps 2007-01-17 19:59:36 UTC (rev 7615)
@@ -1262,6 +1262,10 @@
/drawwidget { % <scalefactor> <annot> drawwidget -
dup /AP knownoget {
+ dup /N known not {
+ ( **** Appearance dictionary (AP) lacks the mandatory normal (N) appearance.\n)
+ pdfformaterror
+ } if
false
[/N /R /D] {
% stack: scale annot appearance false key
Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps 2007-01-17 06:09:38 UTC (rev 7614)
+++ trunk/gs/lib/pdf_main.ps 2007-01-17 19:59:36 UTC (rev 7615)
@@ -1397,12 +1397,13 @@
false exch % Assume no transparency
/Annots knownoget { % Get Annots array
{ oforce /AP knownoget { % Get appearance dict for the annoation
- /N oget % Get the /N (i.e. normal) appearance stream
- /Resources knownoget {
- /ExtGState knownoget {
- extgstateusestransparency { pop true exit} if
- } if % If ExtGState known
- } if % If Resources known
+ /N knownoget { % Get the /N (i.e. normal) appearance stream
+ /Resources knownoget {
+ /ExtGState knownoget {
+ extgstateusestransparency { pop true exit} if
+ } if % If ExtGState known
+ } if % If Resources known
+ } if % If annotation has a normal appearance
} if % If AP dict known
} forall % For all annots on the page
} if
More information about the gs-cvs
mailing list