Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some easy to use program in Ubuntu that can scan many pages straight into a PDF file?

share|improve this question
    
Just wondering, are there any special qualifications needed for scanners/printers that I would like to use in Ubuntu? – JFW Oct 3 '10 at 11:27
    
@JFW, here's a list of supported devices for XSane, the back-end used by most Ubuntu scanners. HP printer/scanner/copiers seem like a good reliable choice, if you're looking. – poolie Apr 17 '11 at 22:49

The idea of having a simple scan utility was behind the development of, well, Simple Scan - the scanning tool installed by default from 10.04 on (Applications ‣ Graphics ‣ Simple Scan). alt text

Simply scan as many pages as you want and choose PDF as file format when saving.

Another slightly less simple program that offers additional features like text recognition is gscan2pdf, also in the repositories. alt text

share|improve this answer
3  
+1 for Simple Scan - it's so easy and simple, but very powerful too - it's particularly suited to the job you mentioned. – 8128 Oct 3 '10 at 14:56

"Easy to use" is in the eye of the user, but xsane provides this functionality. Choose multipage where it says viewer (or hit CTRL-M), and it shouldn't be too difficult to figure out from there.

share|improve this answer
    
Personally I see xsane as far from easy to use... – 8128 Oct 3 '10 at 15:05
    
I've been using xsane all this time. It never occurred to me that there might be a better tool. – Amanda Jun 8 '11 at 14:24

I was using xsane until I saw this question and considered its interface idiosyncratic to say the least, but effective.

Upon seeing this question I went looking and found gscan2pdf living in the Ubuntu Lucid/Maverick repositories. It uses the same scanning (libsane) engine but the UI is far more Gnome-ish. For a good time, try:

sudo apt-get install gscan2pdf
share|improve this answer

Change the file name from myfile.jpg to myfile.pdf on the save dialog of Simple Scan.

Tested on Ubuntu 14.04, Simple Scan 3.12.1.

This works even though the file type drop-down does not show "PDF", only "Images". I consider this an UI bug.

This feature is documented on Help > Contents:

From the "Save As" dialog box, choose one of the supported file types, or simply change the extension in the "Name" field.

It says that the following formats are supported:

  • PDF
  • JPEG
  • PNG
  • TIFF

Interesting fact: if you change the scan type (dropdown besides "Scan") to "Text", the default file type becomes PDF.

share|improve this answer

Scan pages from USB scanner. Use tesseract to OCR into a PDF. Merge multiple pages into one PDF. Usage: scan2PDF outputfilename number_of_pages

#!/bin/bash
#scan2PDF
#Requires:      tesseract 3.03 for OCR to PDF
#               scanimage for scanning, I use  1.0.24
#               pdfunite to merge multiple PDF into one, I use 0.26.5
#
#       Use scanimage -L to get a list of devices.
#       e.g. device `genesys:libusb:006:003' is a Canon LiDE 210 flatbed scanner
#       then copy/paste genesys:libusb:006:003 into SCANNER below.
#       play with CONTRAST to get good images
DPI=300
TESS_LANG=nor  #Language that Tesseract uses for OCR
SCANNER=genesys:libusb:006:003  #My USB scanner
CONTRAST=35   #Contrast to remove paper look

FILENAME=$1 #Agrument 1,filename
PAGES=$2    #Argument 2, number of pages

re='^[0-9]+$'  #Check if second argument is a number
if ! [[ ${PAGES} =~ $re ]] ; then
   echo "error: Usage: $0 filename number_of_pages" >&2; exit 1
fi

SCRIPT_NAME=`basename "$0" .sh` #Directory to store temporary files
TMP_DIR=${SCRIPT_NAME}-tmp

if [ -d ${TMP_DIR} ]  #Check if it exists a directory already
then
        echo Error: The directory ${TMP_DIR} exists.
        exit 2
fi
mkdir ${TMP_DIR}  #Make and go to temp dir
cd ${TMP_DIR}

echo Starts Scanimage...
scanimage -d ${SCANNER} --format=tiff --mode Color --resolution ${DPI} -p --contrast ${CONTRAST} --batch-start=1 --batch-count=${PAGES}  --batch-prompt


echo Starts Tesseract OCR

for file in  *.tif  #Goes through every tif file in temp dir
do
        tesseract $file  ${file%.tif} -l ${TESS_LANG} pdf

done

if [ "$PAGES" = "1" ] #How many pages
then
    cp out1.pdf ../${FILENAME}.pdf  #Only one page, just copy the PDF back
else
        for file in *.pdf  #More pages, merge the pages into one PDF and copy back
    do
            pdfuniteargs+=${file} 
            pdfuniteargs+=" "
    done
    pdfunite $pdfuniteargs ../${FILENAME}.pdf
fi
    echo ${FILENAME}.pdf done

rm *                    #Done, clean up
cd ..
rmdir ${TMP_DIR}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.