2

I have a pdf bundle,i need to extract outline name of each pdf and write it to csv file using bash script or node.js.I am using pdftk library in bash script.In bash script i have use this command pdftk input.pdf burst output output_%02d.pdf but actually i want outline name of page instead of output_%02d.pdf if this is possible then i can extract outline name from each file name of individual pdf enter image description here

Sherin Green
  • 308
  • 1
  • 3
  • 18
  • `pdftk input.pdf dump_data` will produce outline information in the form of `BookmarkBegin`, `BookmarkTitle`, `BookmarkLevel` and `BookmarkPageNumber`. As you know some pdf pages may have multiple bookmarks and some page may have none. You need to consider how to assign individual page to an appropriate bookmark title as a filename. – tshiono Dec 31 '19 at 10:27
  • Hi how will rearrange this pdftk input.pdf burst output output_%02d.pdf this command getting generated pdf file name as outline name – Sherin Green Dec 31 '19 at 10:39
  • or how it to write all outline name to a csv file? – Sherin Green Dec 31 '19 at 10:45
  • I have used this command then sample.txt file like as BookmarkTitle: ASI-530000,BookmarkTitle: Page 1,BookmarkTitle: RAB904_S but i want to write BookmarkTitle: ASI-530000 then how will identify this item only – Sherin Green Dec 31 '19 at 10:50
  • Is it possible to point me to an example of pdf file? Then we can discuss based on an actual sample. BR. – tshiono Dec 31 '19 at 10:57

0 Answers0