It's really rough though.
https://github.com/burtonator/pdf-annotation-exporter
Basically I have it working with:
https://mozilla.github.io/pdf.js/web/viewer.html
Whereby I can paste the pos.js into the console and it can export PDF annotations with screenshots of the annotation.
I intend on using this with Anki to read more complex books and take notes with it.
Now I just need to wire it all together with chrome headless and PDF.js