0.1.1 • Published 1 year ago

@autoanki/autoanki-plugin-content-pdf-fragment v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@autoanki/autoanki-plugin-content-pdf-fragment

This plugin injects the necessary JavaScript to dynamically render PDF (fragments) referenced inside Anki notes.

Caveats

Rendering some annotations requires access to the Internet

For annotations such as "sticky notes", the PDF rendering engine needs to download some SVG icons from the Internet.

Rendering some PDFs requires access to the Internet

Rendering of legacy PDF with non-latin characters requires cmaps.

Examples of such PDFs:

It's a lot of assets to move in the Anki media folder and the PDF rendering engine (PDF.js) expects them to be grouped in a folder, but Anki doesn't support to have folders in the media folder. Thus, we configured the PDF rendering engine such that it downloads these assets from Internet when required, at the cost of making the life of users harder. We thought that caching could mitigate this problem, but unfortunately it appears that Anki's webview doesn't persist the cache across application restarts (which is confirmed also by other users).