I have many technical PDF ebooks where there are no chapters (no clickable table of contents or other means for quick navigation through a document) and therefore it's really painful to search for information without full-text search. How could I create them? I would like to just take a PDF book and generate exact structure of chapters and subchapters, like:

  1. Intro
  2. First chapter
    • Tools you will need
    • Tool XYZ
  3. Second chapter
up vote 12 down vote accepted

Well, you could always buy a copy of Adobe Acrobat, which is actually designed solely for the purpose of creating and editing PDF files.

Or you could import the file into Calibre, convert it to ePub format, edit the ePub to add the table of contents, then convert it back to PDF.

There are other free tools for working with PDF directly. If you do a Google search, you would find this page which lists several free tools for editing or modifying PDF in various ways.

I have used jPdfBookmarks on both Windows and Linux to do exactly what you describe - create your own bookmarks. Find it here.

  • This is my recommendation if you have a table of contents beforehand. See my full tutorial below – Ooker Jun 21 at 1:52

I will extend on @Donald's answer but I would also like to note I do not recommend, personally for quality issues, ever using Calibre for ebook development.

As stated I would suggest getting a copy of Acrobat and you can (for this example I am using Acrobat X Standard but note the I have not seen any difference in the shortcut buttons BUT the GUI has changed since version 9):

  • Open the .pdf file in Acrobat

enter image description here

  • Select the bookmark tab on the left side

enter image description here

  • Create the bookmark (two different ways): By button enter image description here, or use shortcut Ctrl + B (windows) or Cmd + B (mac):

enter image description here

You can create bookmarks by dragging and dropping the sub-level bookmark onto the level 1 bookmark such as:

enter image description here

  • A slightly cheaper alternative to Adobe Acrobat is Foxit's PhantomPDF. I use it at the office a lot to manipulate bookmarks in PDF documents. – Nathan Osman Dec 20 '13 at 5:20

There are also free tools that allow editing/adding bookmarks. A cross platform example is jPdf Tweak.

It is a little clumsy to use, but you can create the table of contents in your favourite spreadsheet program, export as csv and then just import it.

I am used to a simple and free tool that adds clickable bookmarks to PDF or DjVU files: http://handyoutlinerfo.sourceforge.net/.

You first have to prepare (and import in the tool) bookmarks entered in a text file as an indented list of labels and pages. Then the tool creates them in the document as bookmarks you can open/reduce and click on using the left panel.

There are some good options such as shifting all page numbers first with a given constant. This is useful when the prepared file is actually a copy/paste extract from the table of contents existing (but only as text and without bookmarks) in the document: as cover, preface, introduction, ... are generally numbered separately.

  • Welcome to SE-ebooks. You may note that this is an older question, so that reactions may be less. Nevertheless, answering older questions is encouraged when it provides new data or knowledge. – babou Sep 27 at 10:58

Jpdfbookmark can work for scanned books

  1. Prepare the TOC in .txt file

    Chapter 1. The Beginning/23
        Para 1.1 Child of The Beginning/25,FitWidth,96
            Para 1.1.1 Child of Child of The Beginning/26,FitHeight,43
    Chapter 2. The Continue/30,TopLeft,120,42
        Para 2.1 Child of The Beginning/32,FitPage
    

    You can OCR the TOC and use regex to fix it.

  2. Load that TOC

  3. Expand all bookmarks (Ctrl + E), select all of them, then go to Tools > Apply Page Offset

  4. Enter the first pages that outmatch the page number in the TOC

Your can read its manual or watch a quick video tutorial. It has command line mode and can work on Linux, Mac.

The full Adobe Acrobat Pro ver.8 is available as a free legal download from http://www.techspot.com/downloads/4683-adobe-acrobat-8-free.html for both Mac and Windows. Sure, it's not the latest version, but free is good, and it works just fine for adding or editing a table of contents.

  • That does not look legal - I would suspect it of having viruses and trojans. Where on Adobe's site can you get it? or at least an Adobe document saying it is legal – Mark Aug 25 '16 at 18:16

k2pdfopt (free, open source) can also do this by supplying a text file. See the -toclist option. Use like so:

k2pdfopt -mode copy -n -toclist my_chapter_list.txt srcfile.pdf -o outfile.pdf

...where my_chapter_list.txt is a simple ASCII file with page numbers beginning each line, e.g.

1 Cover
2 Table of Contents
5 Chapter 1
25 Chapter 2
...

As there are more than one option to edit PDFs (both free & paid),

For Mac:

Adobe Reader, PDF Expert could be useful options,

For Windows:

Foxit Reader, Xodo are possible options.

You can learn almost everything about editing PDFs and many other possible PDF Editors via this guide to editing PDFs.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.