Synchronizing annotations between local and remote PDFs

People are sometimes surprised to learn that can annotate PDFs. They’re even more surprised when they learn you can annotate a local copy of a PDF in a way that synchronizes with another local copy and/or with a web copy of the same PDF.

Here’s a browser with a local PDF in one tab and a web PDF in a second tab.


To enable what I’m showing here, and if you’re running our Chrome extension, you’ll need to make sure you’re allowing access to local file URLs. Start by opening up the extensions settings:


And make sure Allow Access to File URLs is checked.


OK, now I’ll make an annotation in the second tab against the web PDF.


Switching to the first tab, I see that annotation on the local PDF. And I make another annotation on the local PDF.


And here it is in the web viewer.


If this were a screencast, you’d see both views updating dynamically as annotations sync between them. [Update: Jack Dougherty made a screencast, thanks Jack!] For people who rely on email and/or the local hard drive to find things, this is a convenience. But for me it’s one facet of a general philosophy at Hypothesis.

Consider what makes local PDF annotation possible. It turns out that the PDF specification recommends including a unique ID based on the current time, the file’s pathname, its size, and some other information. Multiple copies of the file can sync to that common ID.

That’s a special case of something of general interest to Hypothesis. A given resource on the web may have many incarnations. Sometimes two different URLs point to the same resource. Sometimes a resource will have vanished from the web but remain accessible in one or more web archives. And sometimes a resource may be in an email attachment or on a local drive. If we can identify and track all these as a family of same resources, we’ll do our best to anchor annotations to any member of the family. That’s the kind of future-proofing and long-term thinking that I admire and, as our newly-appointed product manager, will be happy to help advance.