Thursday, October 9, 2014

Canon MF3010 scanner on Linux Ubuntu 14.04

The MF3010 printer/scanner would print but not scan on Ubuntu, when I first got it. This has now been sorted out, at least to the extent that I can scan.  I'd like to acknowledge the help of the Ubuntu Forum. It has this nice feature that you can sign up to receive an email whenever there is a new post on a specific topic.

Step 1: I first followed these instructions to
download and build sane-backend from source:

In a new subdirectory $HOME/MF3010/sane-backends:

$ sudo apt-get install libusb-dev
$ git clone git://git.debian.org/sane/sane-backends.git
$ cd sane-backends/
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make

(For more detail see:

 http://jonathan.bergknoff.com/journal/scanning-ubuntu-canon-mf3010

The instructions at the end of that piece,
involving moving stuff in the system, are deprecated in the
forum, and anyway can't be used as they stand with Ubuntu 14.04.

Note that libusb is an absolute prerequisite for
any kind of sane functionality.

The make step takes a long time, with many warnings, but
works, as far as I can see.)

Step 2: Second, I uninstalled the version of libsane that came
with Ubuntu14.04.  This automatically removed xsane and
simple-scan as well.  I used the package manager with the GUI,
Ubuntu Software Center.

Third, in directory $HOME/MF3010.sane-backends:

Step 3:
$ sudo make install

With that done,
$ scanimage -V
gives:
scanimage (sane-backends) 1.0.25git; backend version 1.0.25

(Note: you have to have a match of versions here. If you get

scanimage (sane-backends) 1.0.25git; backend version 1.0.23

it means that the old libsane was not removed, or has crept back in.
It will creep back in if you try to reinstall simple-scan
with the package manager, and you'll have to go back to step 2.
)

$ scanimage -L
gives
device `pixma:04A92759' is a CANON Canon i-SENSYS MF3010 multi-function peripheral

You are now good to go.
$ scanimage -h
gives help.

$ sudo scanimage >filename.pnm
gives scary warnings, and I hope I haven't just installed
a trojan, but it
scans whatever is on the scanner plate and saves it as a pnm,
which you can manipulate using gimp (for instance)
into any format you like.

2 comments:

  1. Thanks ... Everything is fine ... scanner works but can use an application, like simple scan, xsane? When I tried to install Simple Scan or Ubuntu Software Center Xsane, the scanner has not worked ... How can scan multipage PDF or TIFF multipage?

    ReplyDelete
  2. As mentioned, reinstallation of xsane messes up scanimage.
    If I understand your question, you want to scan several pages and produce a single pdf. If that is the problem, then a simple brutal solution is:

    1. cd to some scratch, and delete all its contents.

    2. Scan your pages to separate pnm files:
    sudo scanimage > page1.pnm
    sudo scanimage > page2.pnm
    ....

    3. Convert the pnm's to pdf's:
    convert page1.pnm page1.pdf
    convert page2.pnm page2.pdf
    ....

    4. Use gs to combine all the pdfs into a single pdf (here named whole.pdf):
    gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=whole.pdf *.pdf

    I tried this and it works.

    I suppose you could roll all that into a script with one argument for the number of pages, if you had to do it a lot.




    ReplyDelete