Friday, April 20, 2018

Any command-line tool to toggle TOC/outline? via /r/pdf


Any command-line tool to toggle TOC/outline?

I find it really annoying to open a PDF ebook and see the table of contents (TOC) / outline fully expanded making it useless as an overview. Likewise, there are some that are fully collapsed under a single item. Both cases require me to manually toggle the open state of the items to make it usable and no PDF reader remembers the adjusted state, so it must be tweaked each time.

I’d usually rely on cpdf to solve this, by using -list-bookmarks, edit the resulting text file, then re-add them with -add-bookmarks, but I just realized it only supports page-level bookmarks and will convert all the existing bookmarks that point deeper within the pages. So I can’t use this tool without it making the bookmarks less useful in a different way.

Is there any other tool that would allow modifying the outline (technically it’s stored as PDF bookmarks) in the PDF file so the items can be expanded or collapsed as specified? Ideally I could pass a number indicating the desired level and it would close all children below that level and open all children up to that level.



Submitted April 20, 2018 at 04:39AM by tarje
via reddit https://www.reddit.com/r/pdf/comments/8dnmzf/any_commandline_tool_to_toggle_tocoutline/?utm_source=ifttt

from Medical Release Form https://medicalreleaseform.tumblr.com/post/173127507201
via Medical release form
from Tumblr https://jeemiahmelville.tumblr.com/post/173127572232

No comments:

Post a Comment