I regularly need to scan multipage documents using my flat-bed scanner, and create a single PDF file containing all the pages. Until recently I have been using XSane to do this, but there is no pause feature so I have to scramble to change pages while the scanner's lamp is returning to its home position. Also, although XSane is a good application, the user interface for simple tasks such as this is less user-friendly than, say, OmniPage Pro under Windows. Kooka's UI is more user-friendly than XSane's, but Kooka does not create multipage PDFs.
Anyway, I came across an article in the December issue (Issue 85) of Linux Magazine about an application called gscan2pdf which appeared to be just what I was looking for. The application works well and is easy to use. You can read more about it on the gscan2pdf Home Page:
http://gscan2pdf.sourceforge.net/
For me it's perfect for my needs:
- Shows thumbnails of each page in a column on the left hand side of the window.
- The page order can be changed by dragging and dropping thumbnails.
- Individual pages can be deleted by clicking on the thumbnail and pressing Delete.
- It is possible to pause between scanning each page if using a flat-bed scanner.
- It is possible to scan several pages automatically if using a scanner with sheet feeder.
- It quickly saves all the pages to a single PDF document.
- Colour, greyscale and lineart scanning is selectable.
Other features, which I have not tried yet, include:
- Scans can be cleaned up using the (external) unpaper utility.
- It performs OCR (using external utilities).
Users of the excellent OmniPage Pro in Windows will, I think, feel right at home using gscan2pdf rather than XSane or Kooka.
The author, Jeffrey Ratcliffe, is actively developing gscan2pdf and contributes to a thread about it over on the Ubuntu Forums:
http://ubuntuforums.org/showthread.php? ... =gscan2pdf
Anyway, as soon as I read about gscan2pdf, I wanted to try it under SL, but unfortunately it is not yet in the Portage repositories.
However, ebuilds for a lot of packages that are not yet in the Portage repositories can be found in the Gentoo Bugzilla, so I surfed over there and, sure enough, found an ebuild for version 0.9.16:
http://bugs.gentoo.org/show_bug.cgi?id=157887
So, if you want to a) install a very useful application for scanning one or more pages and creating PDFs, and/or b) learn how to install an application that is not in Portage by creating a local overlay, here's how to do it (all as root, in a Terminal window):
1. If it does not already exist, create the directory /usr/local/portage/
2. Create the directory /usr/local/portage/media-gfx/ (media-graphics is an appropriate package category for us to put the ebuild for gscan2pdf).
3. Create the directory /usr/local/portage/media-gfx/gscan2pdf/
4. Now surf over to the Gentoo Bugzilla (see URL above) and save the contents of the link gscan2pdf-0.9.16.ebuild (it's in the Filename column) in a text file called, you guessed it, gscan2pdf-0.9.16.ebuild in the directory you just created.
5. Using your favourite text editor, open /etc/make.conf and add the following three lines to the end of the file (right after the line "source /usr/portage/local/layman/make.conf"):
- Code: Select all
# Following line added by <your name> in order to install local ebuilds:
PORTDIR_OVERLAY=/usr/local/portage
# Comment the above line out when not emerging local ebuilds, as it interferes with emerging packages from Portage.
(Hopefully the third line above is self-explanatory!)
6. If you're not already in it, cd into /usr/local/portage/media-gfx/gscan2pdf/ and type the following command:
- Code: Select all
ebuild /usr/local/portage/media-gfx/gscan2pdf/gscan2pdf-0.9.16.ebuild manifest
This should create the directory /usr/local/portage/media-gfx/gscan2pdf/files/ and the file /usr/local/portage/media-gfx/gscan2pdf/Manifest
7. Now you can go ahead and emerge the package:
- Code: Select all
emerge -1v gscan2pdf
(That's a one, short for "oneshot", not a lowercase L, so as to stop the package being listed in your world file.)
8. Now if you click on K Menu > Applications > Graphics you should find gscan2pdf listed. If you wish you can instead launch it from the command line by typing gscan2pdf<Enter>.
9. You can ignore the little window titled "warning: missing packages" that pops up saying "The scanadf frontend is not available. unpaper missing." and just click on OK.
10. The UI is intuitive and you should be able to pick it up easily, but if you need help see the first two URLs I have given above. Oh, and if you select Lineart mode (i.e. binary mode, a.k.a. B&W mode) then be sure to enter a non-zero Threshold or you scans will all show up as empty white pages. I suggest trying a Threshold value of 50.
11. Finally, don't forget to comment out the PORTDIR_OVERLAY=/usr/local/portage line in /etc/make.conf (by adding a "#" symbol to the beginning of the line) until you need to build another package using your local overlay. Once you realise that the Gentoo Bugzilla is full of ebuilds, the world's your oyster!
