How to best implement fax sending using a multi-function printer?

Helge Blischke h.blischke at acm.org
Fri Jul 2 07:47:27 PDT 2010


Reinhold Kainhofer wrote:

> I'm looking into implementing support for the fax sending of my Konica
> Minolta MF1690 multi-function printer (Actually, it will be way more
> generic and support many more fax multifunction machines). All that is
> needed is a filter to raster the printed page to JBIG (like the foo2*
> filters) and send that to the printer using PJL with proper PJL SET
> commands. An example communication obtained with wireshark is:
> 
> 12345X at PJL
> @PJL SET DRIVERTYPE = PCFAX
> @PJL SET COMPRESS = JBIG
> @PJL SET FAXCOUNT = 1
> @PJL SET FAXTEL = +43-1-58801-9-10515
> @PJL SET PAGESTATUS = START
> @PJL SET PAPERWIDTH = 1728
> @PJL SET PAPERLENGTH = 1179
> @PJL SET RESOLUTION = 98
> @PJL SET IMAGELEN = 1993
> ..... [Here comes the JBIG image data]
> @PJL SET PAGESTATUS = END
> 
> 
> Now, my only problem is how to ask the user for the receiver's fax
> number... How can I display such a dialog between pressing OK on the print
> dialog and finally sending the data to the printer in the backend? I.e. is
> there any way to call a GUI element from a filter? Or is there any other
> way before filters are called? From the documentation it sounds like the
> filters are run as the unprivilegded user lp (or cups), while the backend
> might be run as root. But non is run as the user or has any easy
> connection to the GUI. Is this correct?
> 
> At least, the user name of the printing person is available as a cmd line
> argument to the filter, right?
> 
> The hpfax backend seems to rely on an additional application being
> manually started (hp-sendfax) before printing to the fax printer in CUPS,
> which I regard as highly user-unfriendly. The hpfax backend then
> communicates with hp-sendfax via dbus, and hp-sendfax does all the
> communication with the printer.
> 
> fax4cups, on the other hand, needs a command-line option -J to set the
> number as the job name, which does not work with printing from GUI
> applications...
> 
> I don't like both approaches, to be honest. In particular, since all you
> need to do is send the above PJL commands to the printer, it would make
> much more sense to let the ordinary http/ipp/... backends to the job and
> obtain the phone number before. So, again, what is the easiest way to
> request the phone number from the user?
> 
> Cheers,
> Reinhold

You might consider Till Kamppeter's XPP (X Printing Panel) which by default 
provides setting additional options.

Helge






More information about the cups mailing list