modular-file-renderer icon indicating copy to clipboard operation
modular-file-renderer copied to clipboard

Make hypothes.is annotations on rendered pdfs more portable.

Open felliott opened this issue 7 years ago • 0 comments

Issue

Annotations added to preprints do not follow the file after downloading.

Cause

Annotations for PDFs are linked to two identifiers: the url of the file and a PDF-specific ID embedded in the file. MFR urls are quite complex and unstable and aren't suitable ids. PDF IDs might be stable for native pdfs (depending on the software used to generate them), but are not for docx files converted to pdfs. To make sure annotations stay linked to the preprints, we generate a stable identifier based on non-changing metadata and override the client to use that instead. The stable identifier is not written into the file. This ensures the stability of annotations on the preprints page at the cost of not following the downloaded file.

Possible solution

The OSF doesn't want to modify the user's uploaded file; that's not something we do anywhere else. Another possibility would be for hypothesis to add a third identifier for PDFs, so that we could link annotations by url, embedded id, AND file id.

References

See discussion on the hypothesis Slack here: https://hypothesis-open.slack.com/archives/C6Y375TT3/p1532362687000497

felliott avatar Jul 24 '18 14:07 felliott