Create pdf from scanned book

Nov 21

Intro

We need the scantailor, to ... We also need the pdfbeads to convert images to a pdf file. And finally, we need the latex with the pdfpages and hyperref packages

Page align

Merge tif files to a pdf

pdfbeads *.tif > all.pdf

Modify page labels and add table of contents

In this example the book has cover pages and flap pages. The numbering is started on 3th page starting form 1 using roman numerals. On the 11th page the numbering started again form 1 using arabic numerals and finally on the 65th page the numdering is stared from 1 using alphabets. We also added a pdf TOC.

\documentclass[a4paper]{article}
\usepackage{pdfpages}
\usepackage[pdfpagelabels]{hyperref}
\begin{document}

\renewcommand{\thepage}{Front Cover}
\includepdf[pages=1]{all.pdf}

\renewcommand{\thepage}{Front Flap}
\includepdf[pages=2]{all.pdf}

\renewcommand{\thepage}{\roman{page}}
\setcounter{page}{1}
\includepdf[pages=3-10,
            addtotoc={18,subsection,2,Table of Contents,x0}
           ]{all.pdf}

\renewcommand{\thepage}{\arabic{page}}
\setcounter{page}{1}
\includepdf[pages=11-64,
            addtotoc={
               11,subsection,2,Introduction,x1,
               16,section,1,The Title of the First Section,x2,
               31,subsection,2,The Title of the First Subection,x3,
               35,subsection,2,The Title of the Second Subection,x4,
               43,subsection,2,The Title of the Third Subsection,x5,
               50,section,1,The Title of the Second Section,x6
            }
           ]{all.pdf}

\renewcommand{\thepage}{\Alph{page}}
\setcounter{page}{1}
\includepdf[pages=65-72,
            addtoc={65,section,1,Appendix,x7}
           ]{all.pdf}

\renewcommand{\thepage}{Back Flap}
\includepdf[pages=73]{all.pdf}

\renewcommand{\thepage}{Back Cover}
\includepdf[pages=74]{all.pdf}

\end{document}

Next Post Previous Post