Make Skim save PDF's with embedded notes by default

I had been reading several papers and highlighting important points, pressing Command-S every so often to save my notes.

But when I opened them back, BAM! All my highlights were lost.

It turns out that I have to do File > Export... then choose to save the PDF with embedded notes. Add to that, I cannot press Command-S to save with embedded notes on the same file.

That's totally counterintuitive, takes too many mouse movements and keystrokes, breaks my train of thought, and just disheartening.

How can I make Skim save over the PDF with my notes included, simply by pressing Command-S by default? It was the default behavior until recently. It turns out they changed it in Skim 1.3.22


Solution 1:

Skim preferences has an option for "Automatically save Skim notes backups" which I highly recommend you turn on. This creates a .skim file next to the PDF. Skim still saves annotations to the extended attributes, but I've seen them go missing after sync with Dropbox. It's not supposed to, but it did. Hence, I always keep a notes backup in the .skim companion file.

Skim's big advantage over Preview and every other PDF annotating app is fast saves. This is possible only because Skim keeps the annotations separate from the PDF content. The PDF format is such that adding an annotation to a PDF page requires rewriting the entire PDF back to disk, which can be quite slow. Skim avoids this drawback elegantly because it doesn't rewrite the PDF, only the extended attributes.

So, turn on the backups option, and continue using CMD S in Skim for saving your work. If the extended attributes get wiped out, then when you launch the PDF in Skim, it will detect the .skim file and offer to load it & you can continue your work.

Bonus tip: DevonThink supports Skim annotations natively. So, if it finds a .skim file or extended attributes for the PDF file you're viewing in DevonThink, it will show the annotations too. This avoids the step of having to export a PDF with embedded notes from Skim, which is required for other apps to view annotations you've made in Skim. (Skim provides a free SDK for its annotations format, so other PDF viewers should be able to support skim annotations too.)

Solution 2:

I agree that this process is cumbersome. I've found the easiest way to do it is with a simple Applescript, which you can trigger from the script menu or from a launcher.

Here is what I use:

tell application "Skim"
  set namePDF to name of document 1
  set filePath to file of document 1
  save document 1 in (POSIX path of filePath) as "PDF With Embedded Notes"
end tell

So, here are the steps needed to fully answer your question.

  1. Copy the above Applescript into your Script Editor
  2. Save the script as "Save as Embedded" in ~/Library/Application Support/Skim/Scripts. If that path does not exist, then create it: create the Skim folder first in Application Support, then create a Scripts folder within that.
  3. Open the Keyboard preference pane, then create "Shortcuts" from the top and "App Shortcuts" from the side. Create a Skim shortcut to "Save as Embedded", and assign it to command+s

As mankoff notes, Skim will prompt you every time since you are overwriting the file. To change this behavior, open a Terminal window and input:

defaults write -app Skim SKAutoReloadFileUpdate -boolean true