Extracting bookmarks from PDF files

Started by jtgajda, January 26, 2017, 05:16:11 PM

Previous topic - Next topic

jtgajda

I'm looking for a way to extract bookmarks and their associated anchors from pdf files.
Thank you in advance for any help or suggestions you may have.

StarGeek

I could be wrong, but I don't think exiftool can do this.  I couldn't find this info in exiftool output of a pdf.

A quick search and it looks like pdftk can do it with this command:
pdftk input.pdf dump_data Output output.txt
(output.txt is option, it will print to the command line if missing).

SuperUser answer with more options.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jtgajda


bertalanimre

Indeed PDFTK does the trick. HOWEVER!

I'm tasked to clean the PDF files without harming the content of tables. If I export it with pdftk, then remove the metadata from the PDF, I can't import the data back, since the dictionary is damaged on the PDF. Therefore I need a method to erease the metadata without harming the dictionary. Do you know how to do this?

Phil Harvey

Quote from: bertalanimre on February 03, 2017, 03:57:43 AM
Therefore I need a method to erease the metadata without harming the dictionary. Do you know how to do this?

You answered your own question here.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).