Skip to main content
PDF

PDF #

Warning: This post hasn't been updated for over a year. The information may be out of date.

Everything below is macOS-specific.

I decided to start to collect everything I know about PDF in one place, because it has been very, very frustrating for a very, very long time.

Haven’t tried:

How to create URL link to the specific section of the PDF file? - Super User

Export annotations #

Typically, there are a number of things that you can do to a PDF file in standard PDF readers that are considered to be “annotations” instead of “edits”. These are the names I shall call them by hereafter:

  • Highlight: Add background colour to words and characters
  • Underline: Add lines under words and characters
  • Annotate: Insert text boxes with text inside
  • Draw: Insert shapes or freehand drawings on pages

Very frustratingly, not every PDF reader understands the same set of annotations, and not every PDF reader can export everything that they understands.

If you have a PDF file with pre-existing annotations in them, here is how to export them as (more or less) portable text files.

PDF Expert #

PDF Expert is a paid software.

FileExport Annotation Summary as…, then choose from HTML, Plain text, and Markdown.

Differences between the three versions:

Context of highlightsTOCPage numberAuthor and time
HTML
Markdown××
Plain text×××

I really preferred the HTML version, and went out of my way to find a HTML reader plugin for Obsidian.

Skim #

Website: Skim download | SourceForge.net

Step 0: Make a backup copy of the PDF file in question

Step 1: Convert PDF annotations to Skim Notes: FileConvert Notes…OK

At this point, all of the annotations are converted to Skim Notes, and will no longer appear in other PDF readers.

To export back, use FileExport… and choose PDFWith embedded notes. However, all the highlights and underlines now contain comments, just like Adobe Acrobat’s Copy selected text into Highlight, Strike-Out, and Underline comment pop-ups option (screenshots of Acrobat).

Step 2: Export Notes: FileExport…

In the File Format menu, selecting one of Notes as Text, Notes as RTF, Notes as RTFD, or Notes as FDF will export only the Notes.

Both plain text and RTF file only have the highlighted words and their page number, nothing else. I am not familiar with the other two formats.

Since Skim provides CLI tools, I wonder whether there is a way to do everything in a programmatically. This repo alexandergogl/SkimPDF seems to do Step 1 but not Step 2.

Partial exports: Obsidian/Zotero/Highlights #

Main entries:

I have tried every existing plugin and/or built-in function that I could find with Obsidian and Zotero, but none of them exports annotations, only highlights and underlines. Same for Highlights (I only tried the free Export Notes as PDF option which did not work. Hard to imagine that it would work for other formats).

CLI tools to test #

Word count #

ezgranet/pdfwordcounter: PDF Word Counter

Very minimal GUI app, straight to the point.