I like to scan printed documents and distribute them as PDF files.
My approach is as follows.
- Scan the document to a bunch of image files, one per page.
- Make a latex file that includes each of the images.
- Compile the latex file to get a PDF file.
The operating system is UNIX, and all of the
required pieces of software are free and
open-source. To use my scripts, you need
the to have the following programs installed:
- bash
- cjpeg (from the standard jpeg package)
- scanimage (from the SANE package)
- pnmtopng (from the libpng package)
- pdflatex
The first step of the three steps listed above is handled by a
script called batchscan. You make a
directory, enter that directory
and then run batchscan. It will repeatedly scan and save to
sequentially numbered files. You will be prompted before each
page to specify whether the page should be scanned in grayscale
mode or line art mode. The listing of batchscan is as follows:
The second step of the three steps listed above is handled by
a script called maketex. When you are
in the directory with all of the image files that were output
by batchscan, you run maketex and send the standard output to
a file. The tex file mainly consists of one \includegraphics
statement for each image file that is in the present directory.
The third step is to run pdflatex on the tex file that was
generated by maketex. This gives you a PDF file.