Subject: [netatalk-admins] PostScript with embedded PJL
From: Jonathan Hue (jhue@wco.com)
Date: Mon Mar 30 1998 - 01:00:28 EST
I found that when my NT box sent a PostScript file (generated using a PPD
for an HP LaserJet 5M) to my Sun, there were some PJL commands at the
beginning of the file. Since psf didn't see "%!" as the first two
characters of the file, it happily converted the file to PostScript, and
the LaserJet spewed paper for about five minutes until I realized what
had happened.
Here is a tiny patch that will allow PostScript files with embedded
PJL to pass straight through, so that they print normally on a PostScript
printer that supports PJL:
[295]pondscum:psf: diff -c psf.c.orig psf.c
*** psf.c.orig Fri Mar 27 21:12:16 1998
--- psf.c Fri Mar 27 21:22:38 1998
***************
*** 249,254 ****
--- 249,257 ----
if ( inlen >= 2 && inbuf[ 0 ] == '%' && inbuf[ 1 ] == '!' ) {
syslog( LOG_INFO, "PostScript" );
rc = copyio(); /* PostScript */
+ } else if ( inlen >= 2 && inbuf[ 0 ] == '\033' && inbuf[ 1 ] == '%' ) {
+ syslog( LOG_INFO, "PostScript w/PJL" );
+ rc = copyio(); /* PostScript */
} else {
syslog( LOG_INFO, "straight text" );
rc = textps(); /* straight text */
-Jonathan jhue@wco.com
Adobe Systems Inc., Printing and Systems Division
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:32:02 EST