Skip to content

Make hypothes.is annotations on rendered pdfs more portable. #345

@felliott

Description

@felliott

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions