[gs-cvs] rev 8648 - trunk/gs/toolbin

alexcher at ghostscript.com alexcher at ghostscript.com
Fri Apr 18 21:49:20 PDT 2008


Author: alexcher
Date: 2008-04-18 21:49:20 -0700 (Fri, 18 Apr 2008)
New Revision: 8648

Modified:
   trunk/gs/toolbin/pdfinflt.ps
Log:
Add recognition of abbreviated filter names to the PDF inflation utility.


Modified: trunk/gs/toolbin/pdfinflt.ps
===================================================================
--- trunk/gs/toolbin/pdfinflt.ps	2008-04-19 04:26:26 UTC (rev 8647)
+++ trunk/gs/toolbin/pdfinflt.ps	2008-04-19 04:49:20 UTC (rev 8648)
@@ -47,15 +47,21 @@
       /filterstoremove <<
 	  % list of filters to apply
 	  %   - kept as a dictionary, for faster searches
-	  %   - the corresponding value is currently unused
-	  /ASCIIHexDecode   null
-	  /ASCII85Decode    null
-	  /LZWDecode	    null
-	  /FlateDecode	    null
-	% /RunLengthDecode  null
-	% /CCITTFaxDecode   null
-	% /DCTDecode	    null
-	% /JBIG2Decode	    dup /Filter resourcestatus {pop pop (GS-specific)} {pop} ifelse
+	  /ASCIIHexDecode   {}
+          /AHx              { pop /ASCIIHexDecode } bind
+       	  /ASCII85Decode    {}
+	  /A85              { pop /ASCII85Decode } bind
+	  /LZWDecode	    {}
+          /LZW              { pop /LZWDecode } bind
+	  /FlateDecode	    {}
+          /Fl               { pop /FlateDecode } bind
+	% /RunLengthDecode  {}
+        % /RL               { pop /RunLengthDecode } bind
+        % /CCITTFaxDecode   {}
+        % /CCF              { pop /CCITTFaxDecode } bind
+	% /DCTDecode	    {}
+        % /DCT              { pop /DCTDecode } bind
+       	% /JBIG2Decode	    dup /Filter resourcestatus {pop pop (GS-specific)} {pop} ifelse
 	% /JPXDecode	    dup /Filter resourcestatus {pop pop (GS-specific)} {pop} ifelse
 	% /Crypt	    (no equivalent)
 	>> def
@@ -84,7 +90,8 @@
 		    dup null eq {
 		      pop pop exit
 		    } if
-		    filterstoremove 1 index known {
+		    filterstoremove 1 index .knownget {
+                        exec
 			% apply the filter
 			exch dup null eq { pop } { exch } ifelse
 			filter



More information about the gs-cvs mailing list