It would be nice to have the option to export a PDF’s table of contents to a markdown document.
You can select all, copy, and paste into an existing markdown document. It preserves the page links, though not the hierarchy.
I am using a script from @Bernardo_V which works quite well.
see: Applescript to extract the PDF's TOC into a markdown file
Copy / paste does not help.. If use select all, copy and paste I get cryptic page links like
x-DEVONthink-item://247D20ED-D92C-4928-BB2D-C3FC922B0718?page=0
x-DEVONthink-item://247D20ED-D92C-4928-BB2D-C3FC922B0718?page=2
But my intention is to get the text of the table of contents like
My toc entry 1
My toc entry 2
or even as markdown links with toc entry name and link.
But I just discovered that PdfPenPro has the option to copy the toc entries in text format like this:
- Entry 1
- Entry 1.1
I tried it but the installation of mupdf (required for the script) failed with the error message that one or more header files could not be found.
@rainer1957: I’m curious, have you come from the Windows world?
Yes, switched to Mac only a few years ago. How did you know?
For many, many long-time Mac users, drag and drop is as natural as breathing. Windows users seem to rarely think about it. (They also tend to cut and paste files in the Finder.)
While this may not be 100% what you’re looking for…
Wow! Just what I’ve been looking for. You made my day!
My pleasure!
Drag and drop is one of the first things I try in many instances
This is what I get by selecting, copying, and pasting; it’s the same as what @BLUEFROG gets with drag and drop.
[Cover ](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=0) [Half-title page](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=2) [Title page](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=4) [Copyright page](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=5) [Contents](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=6) [List of Illustrations](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=8) [List of Contributors](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=10) [Introduction](x-devonthink-item://0D5AE91C-7915-469F-9804-0E247D73B21B?page=12) … etc.
That was my error: I tested copying the toc to a text file in Coteditor app. But as soon as I pasted to a markdown document in DEVONthink I got the same result as you. Thank you very much!