About

About

Radiation physics, environmental contamination, and computational science. Researcher working for the Japan Atomic Energy Agency, in Kashiwa, Japan

Spotted an error on this site?
Corrections appreciated, please email alex (at) alexmalins.com or leave a comment.

Converting a scanned TIFF document to PDF and creating text searchable PDFs

You can follow these steps to create a text searchable PDF document if your scanner only outputs TIFF files. If your scanner creates PDF files but doesn’t perform OCR to make text searchable, skip to the last step.

Convert TIFF to PDF

ImageMagick comes with a command line tool convert to do this.

convert scanned.tiff scanned.pdf

Executing this command creates a PDF file from a TIFF created by a scanner.

Optional: Rotate the PDF Pages

Sometimes the scanned pages will need rotating to the correct orientation. Use PDFtk to rotate the pages. Rotating all the pages in the scanned PDF by 90º anti-clockwise is achieved with the following command:

pdftk scanned.pdf cat 1-endwest output rotated.pdf

Individual pages can be selected and rotated as necessary, see PDFtk examples.

Perform Optical Character Recognition

For this step I resort to a copy of Acrobat Pro.

It would have been nice if I had succeeded in achieving good quality output for this step using open source software. Solutions do exist, mainly using Tesseract to do OCR and then forming a new PDF file with a text searchable layer hidden underneath the scanned images. See e.g. Voelkel’s and OCRmyPDF solutions.

However despite reasonable stabs, for various reasons I couldn’t succeed with either. The quality of the OCR output I was getting from Tesseract was lower than Acrobat. Also Acrobat offers the advantage that it performs small rotations to the pages to make sure the text is horizontal. So eventually I gave up on the open source route and now use Acrobat.

Note Acrobat can perform OCR on any PDF file. This is very useful for making old journal articles text searchable if the download offered by the publisher is not.

About Alex Malins

Alex is a researcher working for JAEA in radiation physics and environmental contamination.

Leave a reply

Your email address will not be published.