Bug 43049 - foomatic options not supported, no way to route phone num to custom cups fax driver
Summary: foomatic options not supported, no way to route phone num to custom cups fax ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
3.4.3 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Caolán McNamara
QA Contact:
Whiteboard: target:4.3.0
Depends on:
Reported: 2011-11-17 18:33 CET by Bernard
Modified: 2014-03-31 14:55 CEST (History)
6 users (show)

See Also:
Crash report or crash signature:

gedit fax printer dialog (24.24 KB, image/png)
2011-11-17 18:33 CET, Bernard
LibreOffice fax dialog (26.77 KB, image/png)
2011-11-17 18:34 CET, Bernard
Fax (printer) driver (4.03 KB, application/octet-stream)
2011-11-17 18:35 CET, Bernard
efax-gtk prompt from LO (133.31 KB, image/png)
2012-12-13 03:33 CET, NoOp

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard 2011-11-17 18:33:00 CET
Created attachment 53639 [details]
gedit fax printer dialog

I have a fax modem connection to a Linux machine (Debian).
The fax is connected using the efax package. However, I built a foomatic-rip fax driver (attached) which allows me to enter a fax number.

This works fine with gedit but not with LibreOffice. As you can see from the attached screenshot the fax number field is not ready for input.

So, it seems that LibreOffice doesn't understand the advanced foomatic-rip commands for custom input fields.
Comment 1 Bernard 2011-11-17 18:34:18 CET
Created attachment 53640 [details]
LibreOffice fax dialog

Can't enter a fax number
Comment 2 Bernard 2011-11-17 18:35:57 CET
Created attachment 53641 [details]
Fax (printer) driver

ppd fax driver
Comment 3 sasha.libreoffice 2012-04-21 01:20:41 CEST
Thanks for bugreport
And if we change "Printer language type" (on second screenshot) from PDF to "Postscript level 2", problem remains?
Comment 4 Bernard 2012-04-24 07:29:35 CEST
thanks for looking into this.

The problem is not related to the postscript level.
We need to enter a fax number and this is not possible using the standard driver commands. Please check the foomatic-db-engine package and in particular the README file. It states:

String and Password Options

These options allow the user to supply nearly arbitrary strings
(within limits of length, characters and structure) to the printer
driver, for example names of color calibration files, fax numbers,
passwords for confidential jobs, ... Frequently needed strings can be
added as enumerated choices, so a frontend can show the option as a
combo-box. The enumerated choices are also used for frontends which
only support options as defined by the PPD spec. So having enumerated
choices is highly recommended for most of these options.

In the XML database string and password options look similar to
enumerated choice options. The differences are the option types
"string" or "password" and the additional tags to restrict the
possible strings.

Looking at the  actual ppd driver this translates into:

*OpenUI *Fax/Enter Fax Number: PickOne
*FoomaticRIPOption Fax: string 
*FoomaticRIPOptionPrototype Fax: "%s"
*FoomaticRIPOptionMaxLength Fax: 32
*FoomaticRIPOptionAllowedChars Fax: "0-9"
*OrderDependency: 20 AnySetup *Fax
*CloseUI: *Fax
*CustomFax True: " pop "
*ParamCustomFax Faxno/Enter Fax Number: 1 string 0 20

Using these commands in the printer driver we should be able to enter a numerical fax number of up to 20 digits.

This works fine with gedit, Thunderbird and other programs - but not with LibreOffice.

So, it seems that LibreOffice doesn't understand these foomaticRIP commands.

Comment 5 sasha.libreoffice 2012-04-25 09:11:48 CEST
Thanks for additional testing
Comment 6 Vincent Van Houtte 2012-05-08 01:00:43 CEST
I have been looking into this fax-feature, but have not been succesful on all computers. I can add to this discussion that OOo/LO should be able to grasp the faxnumber from the document if it is formatted like this as text in the document:


It might be a workaround? I have been able to use it like this only once, and every subsequent try failed. But then again, I'm using LO in Debian stable+backports, so I'm not using the latest version of LO and my problem might be fixed in the current version.
Comment 7 Bernard 2012-09-16 02:21:44 CEST
Entering a fax number like @@#1234567@@ into the document and get it transferred to the (fax) printer driver is a second problem.

I tried this on my Debian machine with LO 
The problem still persists; I can't enter a fax number into the printer driver's fax number field - nor does LO fill it in automatically.
Comment 8 NoOp 2012-12-13 03:33:45 CET
Created attachment 71421 [details]
efax-gtk prompt from LO

Not sure if this what you are looking for, but perhaps it will help in troubleshooting your issue: 

I use efax-gtk (Gfax) w/LO and AOO (actually via a Windows softmodem using Martian Modem). The printer settings that I use are here:


When I print to efax-gtk from LO I get a telephone number prompt (see attachment). The key is to set up using 'socket'. The only issue is if you print from a network printer, the phone number prompt appears only on the system running efax-gtk not on the local networked system.
Comment 9 Hans-Peter Jansen 2012-12-13 13:23:22 CET
Being a long time SO, OO and LO user, let me add, that using ppd commands shouldn't be necessary AT ALL.

The point is: fax destinations had always been setup by the spadmin tool (either running as user, or system wide running as root.

There you add a command similar to (hylafax setup):

sendfax -httyUSB0@faxserver -sa4 -mnd(PHONE)

Usual behavior was, that if OO doesn't find a @@#fax@@ number, it raised a overly simple input dialog for the fax destination, and calling the command with (PHONE) and possibly (TMP) replaced with real values. 

Now, behavior is: no dialog is raised. If using a custom command like kdeprintfax (from KDE _3_ fame), the (PHONE) and (TMP) variables aren't replaced at all, leading to errors like:

sh: -c: Zeile 0: Syntaxfehler beim unerwarteten Wort `TMP'
sh: -c: Zeile 0: `kdeprintfax (TMP) 2>/dev/null'

if running lo from a shell.

The only workaround I found is using a command like:

--- 8< --- kdeprintfax.sh --- 8< ---

tmpfile="/var/tmp/$(basename $0).$$.ps"

cat > $tmpfile

kdeprintfax --batch $tmpfile

rm $tmpfile

--- 8< --- kdeprintfax.sh --- 8< ---

Oh well..
Comment 10 Julien Nabet 2014-03-27 21:18:35 CET
Fax4cups will be used in future version.
Here's a patch in master sources (future 4.3.0)

Caolán: may we put this tracker as fixed or is there still elements to implement?
Comment 11 Caolán McNamara 2014-03-28 17:12:34 CET
hmm, well yes I added support for fax4cups where LibreOffice 4.3 will prompt for the phone number to use when that ppd is used and (hopefully correctly) transfer it along to fax4cups.

and we do want to remove spadmin in 4.3

but the original example here of custom FoomaticRIPOptions aren't implemented so this specific example still wouldn't work in 4.3 unless we implement that, which might be possible.
Comment 12 Commit Notification 2014-03-31 14:47:26 CEST
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":


Resolves: fdo#43049 basic PPD custom options support

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 13 Caolán McNamara 2014-03-31 14:55:53 CEST
FWIW it's the lines...

*CustomFax True: " pop "
*ParamCustomFax Faxno/Enter Fax Number: 1 string 0 20

that matter rather than FoomaticRIP* as it turns out.


So this now *seems* to work for me. One can select "Custom" (pre-selected in your simple case where there is only Custom as an option) and an editbox is shown in the tabpage in which the fax-number/custom input can be placed and I see it coming out the far side in cupsAddOption. Real-world testing (e.g. tomorrows daily) appreciated.