Printing PCL from dos client to linux server

Kurt Pfeifle k1pfeifle at gmx.net
Sat Nov 3 17:09:21 PDT 2007


Peter B. Steiger wrote:
> I have CUPS set up and working with Samba 

*Which* Samba?

Which CUPS?

> so my Linux apps can print 
> without any trouble and Windows apps on my XP workstation can print
> without any trouble, but I also need to print DOS apps (through a
> network mapped LPT1 port) that generate PCL.
> 
> The printer is an HP OfficeJet v40xi so it speaks PCL fluently.  
> Currently when I send files containing PCL escape sequences, the page
> comes out with the escape sequence omitted and the parameters printed
> as plain text - e.g., the command to use bold type (ESC)&s3B prints
> as s3B on the page, without actually switching to bold.
> 
> I tried changing from the v40xi PPD to an older driver I know uses 
> only PCL, the Laserjet 5L.  There was no change in the resulting
> output to the printer.
> 
> Any suggestions on how I can make CUPS send PCL data directly to the 
> printer without parsing it?


You have to print the jobs "raw".

In recent Samba versions you can use "cups options = raw" in smb.conf
(this will add to *all* jobs going from Samba to CUPS the "-o raw=true"
parameter; that will affect *all* queues, and all jobs).

You can also add a (additional?) "raw" queue to CUPS. (That means, use
no PPD at all for that queue, all jobs from whichever source will print
as raw)

Or you can try to find out what your CUPS setup makes the "auto-typing"
of the incoming job think it to be. Increase "Loglevel" to debug in
your cupsd.conf, restart cupsd, submit a job, and then search for the
"auto-typing" keyword in the log:

 - Once you know what goes wrong here, tweak the rules in mime.types
   to get it recognized as application/octet-stream (which will print
   raw).

 - Or add a line into the PPD of your printer that forces raw printing
   for whatever mime type the auto-typing's verdict on the file was.
   Say, auto-typing's return was "text/plain", then add this to the
   top 20 lines of your PPD:

   *cupsFilter:       "text/plain        0    -"

This last alternative will selectively print the job types in question
as raw, the rest will be unchanged.

-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list