extractpdfmark
extractpdfmark copied to clipboard
Bookmarks / outline extraction
Hi, I'm able to add an outline to a PDF using pdfmarks, as described here.
For example:
pdfmarks:
[ /Count -3
/Title (chapter 1)
/Page 1
/OUT pdfmark
[ /Title (chapter 1.1)
/Page 3
/OUT pdfmark
[ /Count -1
/Title (chapter 1.2)
/Page 4
/OUT pdfmark
[ /Title (chapter 1.2.1)
/Page 4
/OUT pdfmark
[ /Count -1
/Title (chapter 1.3)
/Page 8
/OUT pdfmark
[ /Title (chapter 1.3.1)
/Page 9
/OUT pdfmark
[ /Title (chapter 2)
/Page 11
/OUT pdfmark
[ /Title (chapter 3)
/Page 30
/OUT pdfmark
[ /Title (chapter 4)
/Page 35
/OUT pdfmark
[ /Title (chapter 5)
/Page 40
/OUT pdfmark
and:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile={output_file} ./pdfmarks {input_file}
will result in an outline like:

Is this program able to extract this type of pdfmarks?
I tried as described in the README, but I got only:
% Extract PDFmark 1.1.1 (with poppler-cpp)
% https://github.com/trueroad/extractpdfmark
[ /PageMode /UseNone /DOCVIEW pdfmark
As described at the beginning of README.md, Extract PDFmark extracts page mode and named destinations. It cannot extract other things like outlines or bookmarks.
Is it possible to add this functionality?
I have no idea. Pull requests are welcome.