[cups.development] XHTML Print format

Claudio Takahasi cktakahasi at gmail.com
Mon Oct 15 11:30:39 PDT 2007

On 10/11/07, Michael R Sweet <msweet at apple.com> wrote:
> Claudio Takahasi wrote:
> > Hi folks,
> >
> > this is my first experience with the CUPS API, so... sorry if I am
> > posting something that makes no sense.
> >
> > How can I print a XHTML-Print document? My objective is receive a
> > document from Nokia phones(N95, N81, ...or any other Bluetooth Basic
> > Printing Profile enabled device) and print it through cups. I already
> > developed the desktop code(BPP server) to receive the document from
> > the phone, but now I don't know how to send this document format to
> > cups. Any suggestion?
> >
> > The received XHTML contains a formatted SMS/image/text, what should be
> > the procedure to print this document? Is it possible print it
> > directly? Convert it to postscript?
> CUPS currently does not offer an XHTML-Print filter, so you'll need
> to use another program (Mozilla maybe?) to do the conversion to
> PostScript so it can be printed.
> --
> ______________________________________________________________________
> Michael R Sweet                        Senior Printing System Engineer

Hi Michael,

I can't use an external app to convert from XHTML-Printer to
PostScript. The BlueZ Printing service should be able to able to
receive XHTML and send it directly to the printer.

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?

How can I use cupsPrintFile() func and print a standard html page? I
don't want the raw content. (Sorry I the begginer question!)

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"


More information about the cups-devel mailing list