In the browser
@inkoxide/vue/browser renders in a Web Worker, with
@inkoxide/wasm installed:
usePdf(document, options?)rendersdocument(a VNode, a component, or a ref or getter of one) at once and whenever it changes, and givesblob,url,loadinganderroras refs, andupdate(). A function that takes props is a functional component; one that takes none is a getter. A render that starts stops the one still running; the end of the scope stops it and revokes the URL.<PdfViewer :document>shows the PDF in an<iframe>, in the browser's viewer (#fallbackbefore the first render,:show-toolbar="false"to hide the viewer's toolbar);<PdfDownloadLink :document file-name="…">is a link that downloads it, its default slot given the render's state;<BlobProvider :document v-slot="{ blob, url, loading, error }">hands the state to its slot.renderToBlobandrenderToStream(a web stream).
They render again only when the document is another one: a VNode of another component or key, or with other prop values. Where the engine and the fonts come from, a CDN and Content Security Policy are in the React guide's In the browser.
Synced from packages/vue/GUIDE.md in the inkoxide repository.