Score:1

How to convert a directory of jpg files to a pdf with filenames as bookmarks?

cn flag

I have a directory of jpg files that are scans of my handwritten notes. How do I convert them to a single pdf file that has the filenames as bookmarks?

(I eventually also want to add ocr. As mentioned online, we can convert the .jpg files to a .pdf using "img2pdf .jp --output combined.pdf", and then we can add ocr using "ocrmypdf combined.pdf combined_ocr.pdf". My question is mainly about how to also make sure the pdf file has bookmarks (created from filenames) so that the document is easy to navigate.)

vanadium avatar
cn flag
pdftk allows to change/add bookmarks on the command line. Possibly, you may merge multiple PDF's and update their bookmarks into a merged PDF. Also Ghostscript works with pdfmarks: see https://unix.stackexchange.com/questions/17065/add-and-edit-bookmarks-to-a-pdf-file
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.