Display SVG or PDF in a Widget

I try to download a SVG or PDF from a website and would like to include it in a Widget. Currently I’m using a PNG, but fonts are not super sharp there. Is there a way, e.g. via WebView, to load a PDF/SVG and display it in a Widget?


let html = `<object data="https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/aa.svg" type="image/svg+xml"></object>`
let wv = new WebView()
await wv.present(true)

seems to work

Sorry, apparently that works only in a webview which can’t be included in a widget. Or can it?