Hello
I am struggling with an issue - hopefully someone has some experience they
can share.
I am trying to implement a PDF printer for a legacy mainframe process that
prints reports to an LPR remote target. I have no access to the job
provider, I am on the target end with a setup as below:
cups-lpd listening on port 515 and receiving the print job. Job is sent
through CUPS to a PDF printer (cups-pdf driver) for archival.

My problem is that the job seems to be prefixed with printer control
characters which is causing problems when it hits CUPS. The spool file is
incomplete (/var/spool/cups-pdf/SPOOL/cups2pdf-XXXX only contains the last
line of the job) and ghostscript complains (quite rightly so) that the
spool is not properly formatted into postscript.

If I remove the control characters from my local copy of the print job and
resubmit it, the PDF gets produced. Otherwise the process ends with an
unrecoverable ghostscript error -1 and a blank PDF. Using a basic text-only
printer driver and sending a job myself through the cups-lpr service, I get
the desired output.

For what it's worth, the control characters in this particular case are:
^[E^[&l0S^[&l5H^[&l1O^[(8U^[(s0P^[(s15H^[(s8.5V^[(s0S^[(s0B^[(s0T^[&l5.2727C^[&k8H^[&l7E^[&a14L^[&l1L^[&s0C^[&a0R

Does anyone have any ideas or suggestions on dealing with this?

Thanks in advance

Reply via email to