

However, I would suggest you try the python script called document-contents-extractor to extract the contents. (Not enough reputation points to comment) Like the answer by Patrick Bourdon, I would also recommend HandyOutliner ( ). In case this package's functionality is not sufficient or using Emacs is no option then the remaining part of this answer remains valid. It includes options to extract the TOC via OCR. Using this package becomes even easier with the toc-mode package for (Spac)Emacs described next.įor all other PDF and DJVU documents there is a new package called toc-mode for Emacs, which in my opinion provides the easiest way to add Table of Contents to documents (for linux and possibly also for different OS's). PDF's not created from scans, I recommend to use (and upvote the answer by Krasjet) pdf.tocgen. I hope you find it useful.įor 'software-generated' PDF-files, i.e.

#CREATE A CLICKABLE TABLE OF CONTENTS IN ADOBE HOW TO#
Please read the homepage for the details on how to use this toolset.

Save it as recipe.toml, and use the pdftocgen command to automatically generate an outline $ pdftocgen onlisp.pdf tocĪnd import it to the PDF file using pdftocio: $ pdftocio -o output.pdf onlisp.pdf < toc You could use the pdfxmeta tool to build a "recipe" file ] It uses the embedded font attributes and position information of headings to generate a table of contents automatically.įor example, for the PDF version Paul Graham's On Lisp, available for download on his website but comes without a table of contents. I wrote an open source command line toolset called pdf.tocgen just for doing this.
