product-backlog
product-backlog copied to clipboard
Can I export PDF annotations?
I would like to save a PDF with the annotations I had made on them. Is this possible? If not, would there be an easy way to do this with the API? I am new to Hypothesis API so please point me to the best resources. Thanks!
Any update?? It seems like the developers are not checking the issues?
@tmabraham you can use judell's script.
Here what I did to retrieve the annotations of a specific annotation:
from hypothesis import Hypothesis
h = Hypothesis(username=<username>, token=<token>)
annotation = h.get_annotation(<annotation_id>)
Otherwise, you can get all annotations from a specific group:
from hypothesis import Hypothesis
h = Hypothesis(username=<username>, token=<token>)
annotations = h.search_all(params={'group': <group_id>})
However, the request takes a few minutes to complete--this last code took 8 min--and I don't know why. Look at the API to know more.
@vitalwarley Thanks, but how would this help save the annotations to a PDF? Would I have to do that separately also in a Python script?
I didn't try to see how to export the PDF with the annotations using this API yet. But there is some work going on to that end, I guess: https://github.com/hypothesis/product-backlog/issues/566
A similar issue exists in our product backlog repo: https://github.com/hypothesis/product-backlog/issues/21
closing in favor of that one.
@klemay Sounds good. But I am not completely sure if this is the same feature request. Importantly, if I understand correctly, the one you have linked is more broad regarding saving any annotations (from websites) as a PDF. I am more interested in taking the already existing PDF and adding the highlights and annotations directly to the PDF. I would think that the former is harder than the latter.
4 years later: this still does not seem to have been addressed? :( Is there any way to donate to this effort/issue?
We have added some general export functionality recently (eg. to text, CSV, HTML). See https://web.hypothes.is/help/exporting-and-importing-annotations/. We haven't implemented export to PDF-native annotations yet.
Probably the most straightforward way to export annotations to PDF is, using the functionality mentioned by Rob above, select HTML as export format, then copy to clipboard, and then paste into any rich text editor (Google Docs, Microsoft Word, etc).
Once there, you should be able to save/export as PDF, as most rich text editors support that.
@acelaya @robertknight My sincere apologies: I think you both miss the point.
This feature request is not about general export to PDF but about exporting PDFs with the annotations and highlights from hypothes.is included. Your suggestions (incl the original closing of this issue by @klemay) have repeatedly misinterpreted this feature request. Both I and OP have annotated and highlighted PDFs using the hypothesis plugin and now we would like to save the PDF with the highlights and annotations included to use it otherwise. This is very different from separately exporting comments into separate files using other formats, which might or might not include PDF or markdown etc.
Could you confirm that you understand what this feature request is about, and how it differs from what you said above?
I understood the feature request to be what you expressed. I just made a point of mentioning what export functionality we do currently have, in case that is useful to anyone following the issue.
I agree this issue is distinct from https://github.com/hypothesis/product-backlog/issues/21. That just says "printable version of a document", whereas this is specifically about exporting an annotated PDF with the annotations embedded, most likely as native annotations.
Thank you very much! This is not the right venue, but if there is any way to help with this please let me know. I haven't seen any obvious way to subscribe to hypothesis, but I'm personally using it a lot, both directly as well as through the obsidian annotation plugin, and it is a big part of my daily workflow