Closed fuxialexander closed 3 years ago
@luhuaei Above is right direction?
@luhuaei Above is right direction?
Great! org-noter and org-pdftools provide many useful feature. :smiley_cat:
@luhuaei Can you help add those APIs ? Thanks
OK, I will try to add those api on pdf-viewer
(eaf-pdf-get-annots PAGE)
will return a map about the annot on PAGE.
if the PAGE has annot will return
{
"annot-id": {
"type_int": "annot type enum, see https://pymupdf.readthedocs.io/en/latest/vars.html#annotation-types",
"type_name": "annot type name",
"rect": "the annot internal position on pymupdf page",
"page": "the page index on pdf"
}
}
if the PAGE no annot will return {}
use the (eaf-pdf-jump-to-annot ANNOT)
jump to annotation position on pdf-viewer
example:
if the page 66
has an annotation, and it id is fitzannot-0
(eaf-pdf-jump-to-annot (gethash "fitzannot-0" (json-parse-string (eaf-pdf-get-annots 66))))
@fuxialexander Those API can satisfy compatible org-pdftools
and org-noter-pdftools
?
great
Is your feature request related to a problem? Please describe. I'm considering making
org-pdftools
andorg-noter-pdftools
compatible with the EAF PDF viewer, however, a few API is still missing. Namely: the functions to:Describe the solution you'd like PyMuPDF actually has support for all these. But they need to be used by EAF to be used from Emacs. Just like what has been done for the function to add an annotation.