Adding options to a print job that already uses printer escape sequences

Solution Verified - Updated -

Issue

  • Our ERP system uses PCL commands to build barcodes to print on forms. These forms need to be printed in landscape and condensed (CPI=17). The "Generic PCL Printer" drivers allow us to print landscape and condensed, but unfortunately mess up the escape codes in the PCL barcodes. On the flip side, the raw print drivers allow the PCL barcodes to print fine but we can't get landscape or condensed.
  • Our ERP system is creating the print jobs using specific PCL strings. It then invokes the lp command to send these PCL files to the printer directly. At some point in this process the "Generic PCL Driver" is stripping escape characters from our job which consequently ruins the barcodes once they get to the printer. Essentially all that prints is the raw barcode string sans the escape characters that tell the printer to create barcodes. We attempted to create a filter that would replace these escape codes but unfortunately finding documentation on CUPS filters and their syntax has proven to be
  • I have a program that is trying to print out to a network printer. The prints do not seem to be following the PCL codes we have embedded in the document. When I set it to textonly it seems to work better in that the gibberish at the top no longer appears. However, when I try to force it to be landscape, textonly doesn't seem to listen.
  • Our software generates print jobs with PCL codes. CUPS is stripping off the escape characters and printing the PCL codes instead of letting the printer interpret them and then process the print job. If we send the print job as a "raw" print or setup the printer as raw, then the PCL codes will work correctly at the printer. However we then loose the option to print landscape and compressed from the lp command. We need to be able to send the print job with PCL codes using the print driver and issue print jobs like "lp -d<printername> -o landscape -olpi8". If the printer is setup as a raw printer we loose the ability to sent "lp -o <options>".

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Common Unix Printing System (CUPS)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content