[cups.general] Append file to print file using filter

Johannes Meixner jsmeix at suse.de
Wed Dec 7 00:18:11 PST 2011


Hello,

On Dec 6 18:40 Edgardo wrote (excerpt):
> I'm working on a new application that require to append
> a text string as the first line of the print file.

I assume you mean something like this:

$ echo 'a text string' \
   | cat - file_to_be_printed \
   | lp -d queue_name

Is it perhaps sufficient when your application runs such
a command?


> So I want to know the best way to do this, if is using
> a filter or at the backend.

Filters are meant to convert the original data into the final
printer specific data.

A backend usually only sends the final printer specific data "as is"
to the printer. But it is not forbidden that a backend may also
change the data. But when a backend makes printer specific data,
the backend becomes a printer model specific backend so that
such a backend can no longer be used for any printer model.

For more information you may have a look at
"The Filter (includes the Driver)" and "The Backends" in
http://en.opensuse.org/SDB:CUPS_in_a_Nutshell
and for some examples you may have a look at
http://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS
and
http://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer





More information about the cups mailing list