Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-23-2018, 06:01 AM   #1
jlemonde
Enthusiast
jlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to behold
 
Posts: 32
Karma: 19864
Join Date: Sep 2018
Device: Kobo Clara HD
How to add a (e-reader compatible) Table of Contents to a PDF in Calibre?

The question is in the title. Please note that I am under Linux and thus do not have Adobe Acrobat Reader / the official PDF editor. My e-reader is a Kobo Clara, but I guess this information is not relevant.

I have tried to add entries to a table of contents from a quite usual PDF reader in Linux, which is evince, but this didn't work. So I ask myself if it is possible from within Calibre or one of its extensions...

Do you know about that ? Thanks in advance !
jlemonde is offline   Reply With Quote
Old 12-23-2018, 08:23 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,913
Karma: 10253972
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does nothave any facility for editing PDF files I'm afraid.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-31-2018, 10:41 AM   #3
compurandom
Addict
compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.compurandom can program the VCR without an owner's manual.
 
Posts: 342
Karma: 172672
Join Date: Jun 2015
Device: kobo aura h2o
I have been using pdftk to add table of contents data to PDFs for a while. I have a few tools I wrote in perl that assist with formatting the data to make it suitable for pdftk.

Unfortunately, the hard part is generating the TOC itself. I have dreams of writing code to scrape the text TOC from inside the document and cleaning it up and helping the user verify the page numbers are right (by a combination of searching for page numbers on document pages and previewing the pages for the user)...

However, right now, that's just a dream, and when I need it, I do it all by hand.

Rarely I find documents that have a clickable internal TOC but no pdf toc.
It might be possible to extract that data and convert it fairly easily, but I haven't looked into it yet. (If this is your situation, let me know, I might be motivated to work on that.)

Calibre has a decent TOC editor that might be suitable to help with this, but unfortunately, that's the easy part. Inserting the TOC is also easy. The hard part is generating the TOC in the first place and verifying the page numbers are right.

I have a large collection of PDFs that I don't even know if they have TOCs without going through each one and checking. Another dream is to write a calibre plugin to update metadata to indicate if a pdf needs a TOC. That's a lot easier; right now I've got my head buried in writing an unrelated calibre GUI plugin, so maybe the pdf toc detector will be next. Maybe after I've looked at calibre's pdf tools (rather than pdftk) I'll see if there's enough mechanism to write a TOC extractor or if I need to write an external tool.

Last edited by compurandom; 12-31-2018 at 10:43 AM.
compurandom is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to add to/edit table of contents for epub books? bookw0rm Calibre 2 02-20-2017 12:50 PM
How do I add a Table of Contents to a Kindle Previewer mobi? Kratos Kindle Formats 22 09-24-2013 07:30 PM
Creator How do I add a table of contents when using mobipocket creator? Kratos Kindle Formats 24 06-20-2012 06:03 AM
PRS-500 Can I add a table of contents to a given lrf file? harpum Sony Reader Dev Corner 0 07-13-2007 09:36 PM
PDF Table of Contents Aerlock Sony Reader 0 01-12-2007 03:26 PM


All times are GMT -4. The time now is 12:26 PM.


MobileRead.com is a privately owned, operated and funded community.