KDE, CUPS and prettyprint
Kurt Pfeifle
k1pfeifle at gmx.net
Mon Sep 24 13:52:23 CEST 2007
Udo Klein wrote:
> Hello,
>
> I'm using KDE 3.5.5 and CUPS 1.2.7.
>
> I'd like to print the name of a file and the date on each thing that I
> print, but the CUPS option "-o prettyprint" does not work.
>
> 1. Does anybody know why?
> 2. Is there another way of achieving my aim?
It depends on your input file...
If it is a text file, you could set up the KDEPrint "pre-filter" called
"Enscript Filter" or "Enscript text filter" (or similar; I'm quoting
from memory).
However, if you print from a KDE application, the app will generate a
PostScript file, and KDEPrint will never see the ASCII, and therefore
never run the pre-filter...
Hence, you must start "kprinter /path/to/your/textfile" from the command-
line. Now again from memory:
* select your printer from the drop-down list
* click "Properties"
* go to right-most tab labelled "Filters"
* click the "funnel" icon (top)
* select above mentioned enscript text filter, confirm with "OK"
* highlight the line with the filter, click on the "wrench" icon (bottom)
* configure your enscript pre-filter (make sure to read "man enscript"
to find out your various header format options).
AFAIR, there is a bug that prevents the header format options to survive
the first usage in case you're using " " (blank) and "=" (equal sign) cha-
racters inside a format string (like in "Page $% of $="). Therefor, "saving"
your pre-filter setting will not survive to the full extend. Replace the
blanks with underscores, and re-add the "=" to the pre-filter options each
time you print.
> Thanks,
> Udo
Cheers,
Kurt
--
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH ..................... Hedelfinger Strasse 58
A RICOH Company ........................... D-70327 Stuttgart/Germany
More information about the kde-print
mailing list