12

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

4 Answers 4

13

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.)

1
  • 1
    There is a huge downside to this approach: The .skim file is only read if there are no notes in the extended attributes (EA), but not if the notes are outdated. In other words, if you sync a PDF via Dropbox (which does not sync those EA), Skim initially uses the notes in the .skim file, but once you hit save, both Macs will only use their local EA, so that the notes will get out of sync. The solution: Save your PDF as a "PDF Bundle" in Skim. This will embed the .skim file inside that bundle and always use that .skim file instead of EA, so you no longer have to worry about out-of-sync notes.
    – NSSynapse
    Nov 19, 2020 at 9:36
5

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
2
  • 1
    Save me from a tremendous amount of trouble.
    – Daniel
    Jul 6, 2015 at 5:06
  • 1
    I had to change the 2nd to last line to save document 1 in (POSIX path of filePath) as "PDF With Embedded Notes" to get this to work. Also, Skim then detects the changed file and prompts to reload. That prompt can be removed by running this at a Terminal prompt: defaults write -app Skim SKAutoReloadFileUpdate -boolean true
    – mankoff
    Nov 2, 2015 at 15:37
1

Normally Skim saves notes in a custom format as extended attributes. Saving with embedded notes makes it modify the actual PDF so that the notes are seen by other applications like Preview. It's under export because it doesn't preserve things like rich text in anchored notes. See the FAQ.

Do the extended attributes get saved in the first place? Try adding some notes to a file and running xattr -l file.pdf. Are the PDFs stored on a non-HFS volume? Everything still works normally for me with 1.3.22.

0

Also, it has been possible in my experience to recover Skim notes that have been lost to Dropbox by using Time Machine and restoring the version of the file immediately after the notes were added (presumably prior to the first Dropbox sync). Obviously you need to be using Time Machine....not a solution but a way to fix the immediate problem that may have led someone to this page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .