Fix for 687824, Ghostscript 8.14/ghostview 4.6 cannot open a speciel *pdf file

Alex Cherepanov <[email protected]> Sun, 05 Dec 2004 07:30:23 -0500
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Coscript Software
Message-ID <[email protected]>
Provide back-up definitions of /-| /RD /|- /ND /| /NP for the benefit of
embedded PDF fonts that forget to define them. Issue a warning when they
are used. Don't fix PS interpreter because Distiller doesn't accept this 
font either.
Fix bug 687824

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
687824.diff (text/plain, 1.1 KB)
Index: gs/lib/pdf_font.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_font.ps,v
retrieving revision 1.71
diff -b -u -r1.71 pdf_font.ps
--- gs/lib/pdf_font.ps	26 Oct 2004 09:44:54 -0000	1.71
+++ gs/lib/pdf_font.ps	5 Dec 2004 11:59:19 -0000
@@ -464,6 +464,19 @@
     currentdict //systemdict eq { end } if
      { stop } if
   } bdef
+
+  /undef_proc_warning {
+    (   **** Embedded font uses undefined procedure ) pdfformaterror
+        .namestring pdfformaterror (\n) pdfformaterror
+  } bdef
+
+  /-| { string currentfile exch readstring pop /-| undef_proc_warning } executeonly bdef
+  /RD { string currentfile exch readstring pop /RD undef_proc_warning } executeonly bdef
+  /|- { noaccess def /|- undef_proc_warning } executeonly bdef
+  /ND { noaccess def /ND undef_proc_warning } executeonly bdef
+  /|  { noaccess put /|  undef_proc_warning } executeonly bdef
+  /NP { noaccess put /NP undef_proc_warning } executeonly bdef
+
 end readonly def
 /readtype1 {		% <font-resource> <stream-dict> readtype1 <font>
 		% Read the definition, using a procedure-based filter