CenterForOpenScience / modular-file-renderer

A Python package for rendering files to HTML via an embeddable iframe
http://modular-file-renderer.readthedocs.io/en/latest/
Apache License 2.0
43 stars 67 forks source link

[SVCS-699] Write a stable id into generated pdfs #338

Closed NyanHelsing closed 6 years ago

NyanHelsing commented 6 years ago

Blocked by [SVCS-678] Refactor and optimize handlers/extensions

Ticket

https://openscience.atlassian.net/secure/RapidBoard.jspa?rapidView=92&projectKey=SVCS&modal=detail&selectedIssue=SVCS-699

Purpose

Write a stable id into generated pdfs, so that hypothesis annotations stay the same even through multiple rerenders.

Changes

adds a requirement for pdfrw, in the unoconv exporter, grab the ids for the original file and stick them into the pdf trailer on the id field.

Side effects

unoconv exporter may take more time

QA Notes

Check a bunch of pdfs and make sure they still convert properly

Deployment Notes

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.1%) to 70.993% when pulling 0d436fe1e2f1274772149e0cc97ef5b60f720ac1 on birdbrained:ft/stable-pdf-ids into 5caac672d4e11301a54dacdd86922b129ee32e24 on CenterForOpenScience:develop.