Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2022, 07:05 AM   #1
Shohreh
Groupie
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 181
Karma: 304158
Join Date: Jan 2016
Device: none
Question Get list of sections to add bookmarks?

Hello,

I'd like to add bookmarks to an existing PDF that has none.

Is there a way to parse a PDF and extract its structure into a text file, which I could then feed to cpdf?

Code:
cpdf.exe -add-bookmarks bookmarks.txt input.pdf -o output.pdf
Thank you.

---
Edit: Since each kind of title (H1, H2, etc.) are formatted in a specific way, it might be possible to find all objects that match (font + size).

https://resources.infosecinstitute.c...sic-structure/

Last edited by Shohreh; 06-23-2022 at 12:55 PM.
Shohreh is offline   Reply With Quote
Old 07-04-2022, 07:43 PM   #2
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,286
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Shohreh View Post
I'd like to add bookmarks to an existing PDF that has none.

Is there a way to parse a PDF and extract its structure into a text file, which I could then feed to cpdf?
Possibly you could extract the text layer and then parse through it looking for obvious beginnings of chapters or sections based on the text? Would depend on the PDF.
willus is offline   Reply With Quote
Advert
Old 07-09-2022, 09:02 AM   #3
Shohreh
Groupie
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 181
Karma: 304158
Join Date: Jan 2016
Device: none
Thanks for the tip.
Shohreh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a reading list and add book to the list? clearskyid Library Management 1 07-05-2021 01:32 PM
Bookmarks/sections completely wrong after conversion to PDF mzso Conversion 4 03-02-2018 05:35 AM
Add sections to book Christine V Kindle Formats 2 05-14-2015 07:08 AM
add to calibre help sections? bauerhjb Calibre 0 02-17-2012 07:04 PM


All times are GMT -4. The time now is 06:23 PM.


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