• CUPS print to FAX for Brother MFC printers

    From Lew Pitcher@lew.pitcher@digitalfreehold.ca to alt.os.linux, comp.os.linux.misc on Mon Apr 20 03:04:23 2026
    From Newsgroup: alt.os.linux

    Recently, I acquired a Brother MFC printer (Brother MFC-L8610CDW), and have installed the appropriate Brother "driver" packages to use it under CUPS.

    One of the packages (the brmfcfaxdrv-2.0.2 "Fax" driver package) includes
    a commandline user script ("brpcfax")to "print to fax", that seems to have
    been written by someone with only a rudimentary concept of what users would
    use it for. Written not in POSIX shell, but in bash, it queues documents to
    a fixed-name print queue ("BRFAX") to be faxed by the printer attached to
    this queue.

    The script, while serviceable, seemed to me to be only just barely adequate
    to it's task, and I have endeavoured to rewrite it so as to provide a few
    more features and a fair bit more flexibility.

    I have tested this rewrite on my own systems, to my own satisfaction. However, I'm not so vain as to think that what I've coded is universal. So, I'd like
    to ask if anyone is interested in testing this script for me.

    It replaces /only/ the /usr/bin/brpcfax script (symlinked to /opt/brother/fax/brmfcfax/command/brpcfax), and, in addition to being a
    drop in replacement for brpcfax, is
    a) written entirely as a POSIX shell script
    b) written to allow user selection of the fax printer queue
    (where the sysadmin has configured CUPS or LPR(NG) to use a different
    queue name for the Brother FAX driver),
    c) handles multiple documents (recognizing restrictions of the Brother
    Fax driver),
    d) properly handles commandline arguments (including file paths) that
    include embedded spaces, and
    e) returns the exit code of the underlying lpr command, rather than
    a fixed 0 returncode

    If there's interest, please respond, and I will send (or post) the
    man page, the script, and the GPL v2 licence that goes with it.


    Thanks in advance
    --
    Lew Pitcher
    "In Skills We Trust"
    Not LLM output - I'm just like this.
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lew Pitcher@lew.pitcher@digitalfreehold.ca to comp.os.linux.misc, alt.os.linux on Wed Apr 22 14:25:26 2026
    From Newsgroup: alt.os.linux

    On Mon, 20 Apr 2026 03:04:23 +0000, Lew Pitcher wrote:

    Recently, I acquired a Brother MFC printer (Brother MFC-L8610CDW), and have installed the appropriate Brother "driver" packages to use it under CUPS.
    [snip]
    I have tested this rewrite on my own systems, to my own satisfaction. However,
    I'm not so vain as to think that what I've coded is universal. So, I'd like to ask if anyone is interested in testing this script for me.
    [snip]

    In recognition of the niche (and declining) status of FAX, and the especially niche status of "print to fax" through a Brother MFC printer, I have licenced my script under the GNU GPL v2, and the associated manpage under the GPL FDL v1.3, and will publish them (the script, and the manpage) here and on my website.

    If anyone is interested, they can download the entire source package from
    http://justlinux.ca/node/98

    And, here is the manpage, so that you can evaluate if you want to try the utility:

    ----------------------------------- 8< -------------------------------------- .TH "BRPCFAX" "1" "2026\-04\-09" "LEW PITCHER" "UTILITIES"
    .SH "NAME"
    brpcfax \- commandline print-to-fax for Brother MFC/FAX devices

    .SH SYNOPSIS
    .SY brpcfax
    .OP \-p <PRINTER>
    .B \-o
    .I fax-broadcast=<PATH>|fax-number=<PHONE_NUMBER>
    .OP \-o --brpcfax-debug=<LEVEL>
    .OP \-o .\|.\|.
    .RI [ FILE
    .IR .\|.\|. ]
    .YS

    .SH DESCRIPTION
    .PP
    .B brpcfax
    provides a commandline facility to send faxes via a Brother MFC/FAX device.
    It fronts the
    .I lpr(1)
    command, collecting requisite fax-related information and print files
    for submission (via lpr(1)) to the fax machine.

    .SH OPTIONS
    .PP
    .BI \-P " <PRINTER>"
    .RS 4
    If specified, this parameter causes brpcfax(1) to spool output to the specified .I <PRINTER>
    as the Brother MFC/FAX device. Left unspecified, the printer defaults to
    the value of the FAXPRINTER variable set in the
    .B brmfcfax.config
    file, or "BRFAX" if the FAXPRINTER setting is absent from the config file.
    .RE

    .PP
    .BI \-o " fax-broadcast=<FILENAME>"
    .RS 4
    If specified, this parameter causes brpcfax(1) to send the fax to all the telephone
    numbers specified in the associated file named by FILENAME. If not specified, then
    brpcfax(1) will expect the
    .I \-o fax-number=<PHONE_NUMBER>
    flag.
    .RE

    .PP
    .BI \-o " fax-number=<PHONE_NUMBER>"
    .RS 4
    If specified, this parameter causes brpcfax(1) to send the fax to the specfied telephone number. If not specified, then brpcfax(1) will expect the
    .I \-o fax-broadcast=<FILENAME>
    flag.
    .RE

    .PP
    .BI \-o " --brpcfax-debug=<LEVEL>"
    .RS 4
    If specified, this parameter causes brpcfax(1) to provide debugging information.
    Valid levels are
    .IP 0 4
    live execution without debugging,
    .IP 1 4
    live execution with debugging,
    .IP 2 4
    no execution, debugging only
    .P
    Any other value will invoke live execution without debugging.
    .RE

    .PP
    .BI \-o " ..."
    .RS 4
    Optionally, the commandline may include other lpr(1) -o options as necessary. See the
    results of lpoptions(1) for a list of options recognized by the Brother MFC/FAX device,
    .RE

    .PP
    .B FILE ...
    .RS 4
    Specifies the path to the file (or files) to send to the FAX printer. If the commandline
    does not specify any files, the utility will use the stdin stream as it's data source.
    .RE

    .SH FILES
    .PP
    .B /opt/brother/fax/brmfcfax/config/brmfcfax.config
    .RS 4
    This contains the brpcfax(1) configuration values, in SHELL script form.
    .RE

    .PP
    .B /opt/brother/fax/brmfcfax/lpd/i686/brps2brfax
    .PP
    .B /opt/brother/fax/brmfcfax/lpd/x86_64/brps2brfax
    .PP
    .B /opt/brother/fax/brmfcfax/lpd/armv71/brps2brfax
    .RS 4
    This binary (supplied in three different machine architectures) provides
    the raw interface between the print system and the Brother MFC/FAX device.
    In the case of brpcfax(1), this program provides fax number validation.
    .RE

    .SH NOTES
    .PP
    This version of brpcfax(1) is a functional replacement (with enhancements)
    of the
    .B brpcfax
    script supplied by Brother in the
    .B brmfcfaxdrv-2.0.2
    package. This version, written as a POSIX shell compatible script, will
    .IP \(bu 4
    allow
    .B brmfcfax.config
    to assign a default FAX printer through a shell assignment to the
    .B FAXPRINTER
    variable. If not set by brmfcfax.config, this script defaults the FAX
    printer assignment to "BRFAX".
    .IP \(bu 4
    provide a commandline option to override the default FAX printer assignment
    .IP \(bu 4
    use the POSIX shell
    .B getopts
    built-in command to iterate through commandline options
    .IP \(bu 4
    accept multiple print files for faxing
    .RS 4
    .BI NB: " Each file will constitute it's own FAX, and dial-out separately. To send"
    .I multiple files in one FAX dialout, use a utility program to combine the files,
    .I and pipe the results into brpcfax. For example:
    .EX
    qpdf --pages "fax cover.pdf" "My Document.pdf" -- --empty - |
    brpcfax -P myFax -o fax-number=15551234567
    .EE
    .RE
    .IP \(bu 4
    properly handle print file names with embedded spaces
    .IP \(bu 4
    correct some error exit codes
    .IP \(bu 4
    return lpr exit code as our own status

    .SH SEE ALSO
    .PP
    .B lpr(1), lpoptions(1)

    .SH AUTHOR
    .PP
    .MT lew.pitcher\:@digitalfreehold.ca
    Lew Pitcher
    .ME

    .SH COPYRIGHT
    This document is copyrighted by Lew Pitcher (2026) and licensed
    under the GNU Free Documentation License version 1.3. See
    .UR https://\:www.gnu.org/\:licenses/\:fdl-1.3.html#license-text
    The GNU Free Documentation Licence v1.3
    .UE ,
    for details.

    ----------------------------------- >8 -------------------------------------- --
    Lew Pitcher
    "In Skills We Trust"
    Not LLM output - I'm just like this.
    --- Synchronet 3.21f-Linux NewsLink 1.2