[gs-cvs] rev 8827 - trunk/gs/lib

alexcher at ghostscript.com alexcher at ghostscript.com
Wed Jul 9 15:59:00 PDT 2008


Author: alexcher
Date: 2008-07-09 15:59:00 -0700 (Wed, 09 Jul 2008)
New Revision: 8827

Modified:
   trunk/gs/lib/pdf_main.ps
Log:
Use '%PDF-' instead of '%PDF-1.' to recognize PDF files because PDFsharp 0.8.2
generates '%PDF-0.0' and Acrobat accepts this. Bug 689949, customer 384.

DIFFERENCES:
None


Modified: trunk/gs/lib/pdf_main.ps
===================================================================
--- trunk/gs/lib/pdf_main.ps	2008-07-08 12:01:40 UTC (rev 8826)
+++ trunk/gs/lib/pdf_main.ps	2008-07-09 22:59:00 UTC (rev 8827)
@@ -88,13 +88,13 @@
       dup 1023 string .peekstring pop dup length 400 ge {
 	% "1024 string" exceeds current %stdin buffer
 	% Valid PDF file cannot be smaller than 400 bytes.
-	(%PDF-1.) search {
+	(%PDF-) search {
 	  3 1 roll pop pop
 	  dup (%!PS) search not {
 	    length 0 ne { 
 	      1 index exch readstring pop pop
 	      (%stderr) (w) file dup 
-	      (   **** Warning: File has some garbage before %PDF-1. .\n)
+	      (   **** Warning: File has some garbage before %PDF- .\n)
 	      writestring flushfile
 	    } { 
 	      pop
@@ -123,7 +123,7 @@
 	    pop pop pop pop cvx .runps % (%!PS) found first
 	  } ifelse
 	} { 
-	  pop cvx .runps % (%PDF-1.) not found
+	  pop cvx .runps % (%PDF-) not found
 	} ifelse
       } { 
 	pop cvx .runps   % too short for PDF



More information about the gs-cvs mailing list