How To Install gscan2pdf In Ubuntu

man typing on his keyboard

Dear Ubuntu Geeks,

In this tutorial I will teach you how to install a nice app for scanning pages and exporting them as pdf files. The app I will show you how to install in your Ubuntu machine is called gscan2pdf. I use this gui app to produce pdfs from scanned documents.

Synopsis:

– Scan one or several pages in with File/Scan
– Create PDF of selected pages with File/Save

Ok, now open a new terminal (CTRL+ALT+T) and type the following commands to install gscan2pdf in your machine. We will install the latest version of gscan2pdf via PPA.

sudo apt-add-repository ppa:jeffreyratcliffe/ppa
sudo apt-get update
sudo apt-get install gscan2pdf

After the installation is finished you can launch gscan2pdf by going to Applications, Graphics, gscan2pdf.

Key Features of gscan2pdf

  1. Works with Any Standard Scanner: If your scanner’s compatible with SANE, it’ll work with this.
  2. Editing Tools: Trim, set the right levels, and polish your scans.
  3. Page Organization: Easily drag and drop to rearrange the order of your pages.
  4. Multiple Formats: Group scans into PDF, DjVu, or TIFF. For individual scans, choose from formats supported by ImageMagick.
  5. Enhanced Text Recognition: Detect text within given boundaries using Ocropus.
  6. Smart Naming: The software can suggest file names using the details from the PDF itself.

For the tech-savvy, it’s interesting to note that the scans are managed with SANE using scanimage. The PDF::API2 manages the PDF conversion, and libtiff takes charge of exporting TIFF files.

Getting Started with Gscan2pdf

  1. After installation, you can straightaway launch Gscan2pdf.
  2. Use File/Scan to scan one or more pages.
  3. Just select the pages and hit File/Save to generate a PDF. 

Gscan2pdf Command Line Options

Here are the options available for use with this utility:

  • –device=: Choose a scanner device directly, bypassing the SANE device list. Perfect for remote scanners, especially those that are set up not to appear on the network.
  • –help: Need a quick guide? This shows the help page.
  • –log=: Pick where to save the log messages.
    • Log Levels: Define with (debug|info|warn|error|fatal). It’s ‘warn’ by default or ‘debug’ if you specify a log file.
  • –import=<PDF|DjVu|image>: Directly import a given file.
  • –version: Shows you which version you’re using before exiting.

How to Uninstall gscan2pdf

You can remove this utility from your machine by running the following commands:

sudo apt-get remove –autoremove gscan2pdf

sudo apt-get update

 

Or, if you’re just having issues with the utility and simply need to diagnose errors, run this command to launch gscan2pdf and check the log file:

gscan2pdf –log=file.log

 

Frequently Asked Questions about gscan2pdf 

What are the configuration details of gscan2pdf?

Gscan2pdf has a text file at ~/.config/gscan2pdfrc. If you wish, you can change this directory by modifying the $XDG_CONFIG_HOME variable. You can do this using the Edit/Preferences menu.

How to Build the gscan2pdf utility from its source file?

You will need to first download the source file from a trusted location, such as the Sourceforge release or the official Git repo. Like any other compressed file, you will need to extract it using the tar command. The command will look something like this:

tar xvfz gscan2pdf-x.x.x.tar.gz cd gscan2pdf-x.x.x

 

You can then use perl makefile.pl to create the makefile. The make test will run several dozen tests to ensure the utility works properly on your machine. 

The gscan2pdf utility is unable to find my scanner, what to do?

 

Your scanner must be directly connected to the machine on which you’re running the utility. Furthermore, you must ensure that your machine has “saned,” the SANE daemon, installed. 

If it is installed, you will need to indicate to gscan2pdf which device to use, as it cannot find the device automatically. Use the –device option to do this.

I updated gscan2pdf via the Update Manager on my Ubuntu machine, but I don’t see a list of changes. Why?

You will see changelogs only if the developers update them on changelogs.ubuntu.com. 

I am unable to scan files using the flatbed of my HP scanner!

If you have an HP scanner with a feed tray (ADF), you will need to set the “# Pages” option to “1” to scan with the flatbed. You may also need to set the “Batch scan” option to “No” to make it work.