[cups] CUPS sometimes printing command codes instead of document

Robert Heller heller at deepsoft.com
Thu Jun 6 08:16:51 PDT 2019


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
                                                                                                            


More information about the cups mailing list