PCL Autodetection
Hans Fugal
hfugal at wencor.com
Fri Dec 3 15:12:53 PST 2004
We (finally) migrated from lprng to cups recently, and had trouble with
various software that generates PCL. I was under the impression that PCL
was autodetected and passed along to the printer, but I was getting
strange text instead of the printout.
After a little investigation, I discovered the autodection for PCL is a
little bit too restrictive.
--- mime.types.orig 2004-12-03 15:57:50.000000000 -0700
+++ mime.types 2004-12-03 15:58:35.000000000 -0700
@@ -141,9 +141,7 @@
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
- (contains(0,128,<1B>%-12345X) + \
- (contains(0,1024,"LANGUAGE=PCL") \
- contains(0,1024,"LANGUAGE = PCL")))
+ string(0,<1B>%-12345X)
########################################################################
#
The PCL spec doesn't require that LANGUAGE=PCL (or a variant thereof)
appear in the PJL. However it does state:
Universal Exit Language
-----------------------
Terminates operation of current language and returns control to PJL.
Every job should begin and end with this command.
<ESC>%-12345X
Which translates to string(0,<1B>%-12345X) (for the beginning part). So
The above patch is a more reliable match. I also wonder why <1B>E is
checked only at the beginning and not with a contains?
If this isn't the appropriate forum for this patch and/or questions let
me know. Thanks!
More information about the cups
mailing list