[cups] CUPS sometimes printing command codes instead of document

Johannes Hass johannes.hass at bs18.de
Fri Jun 7 01:39:17 PDT 2019


So I just tried to uncomment the line in mime.convs because the printer is installed as a PCL6 one anyway.

Does exactly zilch to the problem. Sometimes it prints properly and then I get the command codes. Again, from the “ime=10:05:20 2019/06/06” line it looks to me like something cuts off the first part of the printing job because that surely should be “Time=…” or similar.

Is there some way to tell CUPS to throw away everything that’s not recognized as PCL6 (i.e. recognized as ASCII) because, frankly, a print job that’s just thrown away is better than a print job that wastes a hundred pages of paper…

… regardless, I’d like to find the source of the problem. Is there some way to tell if it’s a problem because the print job is garbled by the source (i.e. already cut off when received by CUPS) or if it’s something caused somewhere in the CUPS pipeline after it has processed the request?

Von: Robert Heller
Gesendet: Donnerstag, 6. Juni 2019 17:17
An: The CUPS user discussion list.
Cc: The CUPS user discussion list.
Betreff: Re: [cups] CUPS sometimes printing command codes instead of document

At Thu, 06 Jun 2019 16:35:48 +0200 (CEST) "The CUPS user discussion list." <cups at cups.org> wrote:

> 
> 
> Hello,
> 
> On Jun 6 13:33 Johannes Hass wrote (excerpt):
> > Sometimes printing works fine, everything comes out as it should.
> > But also sometimes you get pages full of command codes,
> > always beginning with
> >
> > ime=10:05:20 2019/06/06?
> > @PJL OKIAUXJOBINFO DATA=?DocumentName=PDF-Datei?
> > ?
> >
> > And so on and so forth. The first line is obviously the current time
> > and date. To me this looks like somewhere the beginning of the
> > commands does not get recognized and thus everything following
> > is interpreted as pure ASCII.
> 
> I guess it is in your CUPS mime.convs file this part
> ---------------------------------------------------------------
> # Raw filter...
> # Uncomment the following filter to allow printing
> # of arbitrary files without the -oraw option.
> application/octet-stream  application/vnd.cups-raw  0  -
> ---------------------------------------------------------------
> 
> The CUPS mime.convs file could be located in a directory
> that differs from Linux distribution to Linux distribution
> and/or from CUPS version to CUPS version, e.g. mine is
> /usr/share/cups/mime/mime.convs
> but it could also be in /etc/ or in similar directories.
> 
> When the above line is active (uncommented) any unknown
> data format is sent as is directly to the printer device
> and it happens that your particular printer model
> interprets/prints it as if it was regular plain text.
> 
> This happens in particular on not so dumb office printers that
> support several standard printer languages like PostScript and PCL
> which do plain text printing as fallback mode (which makes sense
> because plain text has no special header to identify the format,
> cf. "There is no such thing as 'plain text'" in
> https://en.opensuse.org/SDB:Plain_Text_versus_Locale
> 
> Dumb cheap (mostly inkjet) devices do usually nothing
> when they get data that they cannot recognize.

They will print plain text using a default font (eg they will behave like an
old-school "dot-matrix" printer), which appears to be what is happening here.
Dumb cheap (mostly inkjet) printers either expect their own partitular
bit-hacked format (usually involving ESC-prefixed command codes) or else they
print print plain text. Smarter printers (generally laser printers) understand
several printer "languages", like PostScript (Brother printers support
BrScript, which is Brother's brand of PostScript) or PCL, and deduce which
print engine to use, automagically.

> 
> 
> Kind Regards
> Johannes Meixner

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                                            
_______________________________________________
cups mailing list
cups at cups.org
https://lists.cups.org/mailman/listinfo/cups



More information about the cups mailing list