CUPS Fax Backend Howto?

Helge Blischke h.blischke at acm.org
Sun Jul 3 07:25:52 PDT 2011


Tilman Schmidt wrote:

> Hello Forum,
> 
> I am maintainer of a Linux ISDN driver. (drivers/isdn/gigaset)
> One popular application for this driver is sending and receiving faxes via
> the program capifax. (http://capifax.v3v.de/)
> 
> Capifax comes with a shell script for integration with CUPS which is
> pretty awkward to use: it must be run in the background from an X session
> in order to listen on a TCP port which CUPS can address as a network
> printer, and then pops up a dialog via zenity to ask for the destination
> fax number. All other parameters must be set as variables in the script
> itself.
> 
> A more natural solution would be a capifax CUPS backend connecting capifax
> directly into CUPS, like fax4CUPS does for some other fax programs. I
> tried to create such a backend for capifax but hit some obstacles. The
> current state of my work is available for download at
> http://www.phoenixsoftware.de/~ts/capifax4CUPS.tgz I would be grateful for
> comments on how to address these problems:
> 
> 1. When printing from the command line through the "lp" command,
> specifying the destination number works fine, either as the job name or as
> option "phone". This does not work when printing from an application. The
> "pseudo-Foomatic driver" section at the end of the PPD file doesn't seem
> to have any effect.
> 
> 2. Printing from the command line only works for PostScript files. Other
> formats seem to get sent to the backend without conversion, making
> GhostScript barf. I expected CUPS to take care of that, converting
> everything to PostScript before passing it to my backend.
> 
> Other comments on how to improve that backend or pointers to relevant
> documentation are of course also very welcome.
> 
> aTdHvAaNnKcSe
> Tilman

First, the "pseudo-Foomatic driver" stuff in the PPD is obsolete. It was last supported 
in foomatic-rip 3.x.y (though already deprecated), which was the last foomatic-rip written in Perl. 
Current foomatic-rip is written in C and only emits an error message when finding stuff like this.

Second, I'd suggest to do all the necessary conversions in a filter, say
pstocapifax, and specify this filter in the PPD as follows:
*cupsFilter: "application/vnd.cups-postscript 0 pstocapifax"
This guarantees that any input format gets correctly transformed to the faxg3 tiff
format.

Third, I'd append the printer specific options to the device-uri (separated by the proper uri by 
a "?") and implement means to extract the destination number e.g. from the job title
or whatever you like.

Feel free to contact me directly (h dot blischke at acm dot org).

Helge






More information about the cups mailing list