[cups.development] XHTML Print format
Michael R Sweet
msweet at apple.com
Mon Oct 15 11:50:31 PDT 2007
Claudio Takahasi wrote:
> I still digging the CUPS implementation to try figure out the best
> approach to solve this problem. Instead of implement the file
> conversion inside the BlueZ Printing service the reasonable approach
> seems to be implement a XHTML filter. Do you have code examples or
> docs explaining how filters works?
First, get a copy of the CUPS book. While it doesn't cover the
latest 1.2/1.3 features, the discussion on the printing system
and how filters work is up-to-date and will give you the background
The on-line help (http://localhost:631/help) in CUPS 1.2 and
higher, and the documentation on the CUPS web site will provide
some useful reference information. Also:
will give you the abridged version.
> How can I use cupsPrintFile() func and print a standard html page? I
> don't want the raw content. (Sorry I the begginer question!)
cupsPrintFile just sends the document to cupsd, which then figures
out the MIME type (format) of the file and the filters that need to
be run to print it.
> Not sure, but I think the answer is the texttops filter in the
> mime.convs file, right?
> /etc/cups/mime.convs file:
> "text/html application/postscript 33 texttops"
That's the basic mapping - if you did your own filter or added the
XHTML MIME type, just create vendor.types and vendor.convs files
that point to your new filter and use a lower cost so that your
filter is run instead of texttops.
Michael R Sweet Senior Printing System Engineer
More information about the cups-devel