[gs-cvs] rev 9601 - trunk/gs/Resource/Init

alexcher at ghostscript.com alexcher at ghostscript.com
Sat Mar 28 12:32:04 PDT 2009


Author: alexcher
Date: 2009-03-28 12:32:04 -0700 (Sat, 28 Mar 2009)
New Revision: 9601

Modified:
   trunk/gs/Resource/Init/pdf_main.ps
Log:
Ignore /XObject attribute if it's not a dictionary. Recover broken
PDF file generated by "Allegro Design Publisher". Bug 690364, customer 870.

DIFFERENCES:
None.


Modified: trunk/gs/Resource/Init/pdf_main.ps
===================================================================
--- trunk/gs/Resource/Init/pdf_main.ps	2009-03-27 05:01:39 UTC (rev 9600)
+++ trunk/gs/Resource/Init/pdf_main.ps	2009-03-28 19:32:04 UTC (rev 9601)
@@ -1655,15 +1655,21 @@
       { pop //true exit } if
     } if
     dup /XObject knownoget {
-      //false exch {
-	exch pop oforce dup /Subtype get
-	dup /Image eq { 1 index /SMask known { pop pop not exit } if } if
-	/Form eq {
-	  3 index exch resourceusestransparency { not exit } if
-	} {
-	  pop
-	} ifelse
-      } forall { pop //true exit } if
+      dup type /dicttype eq {
+        //false exch {
+	  exch pop oforce dup /Subtype get
+	  dup /Image eq { 1 index /SMask known { pop pop not exit } if } if
+	  /Form eq {
+	    3 index exch resourceusestransparency { not exit } if
+	  } {
+	    pop
+	  } ifelse
+        } forall { pop //true exit } if
+      } {
+        (   **** Ignoring non-dictionary /XObject attribute.\n)
+        pdfformaterror
+        pop
+      } ifelse
     } if
     2 copy //false put             % Visited but not in the current chain.
     pop //false exit
@@ -1748,9 +1754,13 @@
       { exch pop oforce /ColorSpace oget 3 index colorspacespotcolors } forall
     } if
     /XObject knownoget {
-      { exch pop oforce dup
-        /Subtype get /Form eq { resourcespotcolors } { pop } ifelse
-      } forall
+      dup type /dicttype eq {
+        { exch pop oforce dup
+          /Subtype get /Form eq { resourcespotcolors } { pop } ifelse
+        } forall
+      } {
+        pop % Just ignore here, already reported by resourceusestransparency.
+      } ifelse
     } if
     exit
   } loop



More information about the gs-cvs mailing list