Author: alexcher
Date: 2008-03-27 23:36:49 -0700 (Thu, 27 Mar 2008)
New Revision: 8612

Modified:
   trunk/gs/lib/pdf_main.ps
Log:
Improve detection of transparency usage. Search for transparency featires in
the resource chain of annotattion appearance streams.
Bug 689764, customer 531.

DIFFERENCES:
None


Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps	2008-03-27 08:37:58 UTC (rev 8611)
+++ trunk/gs/lib/pdf_main.ps	2008-03-28 06:36:49 UTC (rev 8612)
@@ -1563,20 +1563,20 @@
 % of any other transparency features, they have no effect.
 /pageusestransparency {		% <pagedict> pageusestransparency <bool>
   PDFversion PDFtransparencyversion lt NOTRANSPARENCY or {
-    pop false
+    pop //false
   } {
-    dup false exch {
+    dup //false exch {
       4 dict 1 index resourceusestransparency { pop not exit } if
       /Parent knownoget not { exit } if
     } loop
     % Also check for transparency in the annotation (if not in resources).
-    { pop true } { annotsusetransparency } ifelse
+    { pop //true } { annotsusetransparency } ifelse
   } ifelse
 } bind def
 
 % Check if transparency is specified in an ExtGState dict
 /extgstateusestransparency {	% <gstate dict> extgstateusestransparency <bool>
-  false exch		% Assume no transparency
+  //false exch		% Assume no transparency
   {			% establish loop context
     exch pop oforce
     dup /BM knownoget { dup /Normal ne exch /Compatible ne and
@@ -1625,17 +1625,13 @@
 
 % Check if the annotations on a page use transparency
 /annotsusetransparency {	% <page dict> annotsusetransparency <bool>
-   false exch			% Assume no transparency
+   //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
-	  /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
+         /N knownoget { 	% Get the /N (i.e. normal) appearance stream
+           4 dict exch resourceusestransparency { pop //true exit } if
+         } if
+       } if  			% If AP dict known
      } forall			% For all annots on the page
    } if
 } bind def

_______________________________________________
gs-cvs mailing list
gs-cvs@ghostscript.com
http://www.ghostscript.com/mailman/listinfo/gs-cvs
