Add pdfmake-based PDF download example.#140
Conversation
Deploying vc-examples with
|
| Latest commit: |
92c23d9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f3dc7748.vc-examples.pages.dev |
| Branch Preview URL: | https://pdfmake.vc-examples.pages.dev |
dlongley
left a comment
There was a problem hiding this comment.
Just one concern here -- otherwise this looks good to me.
| }).getDataUrl().then((dataUrl) => { | ||
| downloadButton.removeAttribute('hidden'); | ||
| downloadButton.href = dataUrl; | ||
| window.renderMethodReady({ ready: true, pdf: dataUrl }); |
There was a problem hiding this comment.
I'm worried that the naming here (that I think we know we don't want) will become sticky, so we should figure out some alternative that is at least a little more generalized (more "live-withable") before merging.
There was a problem hiding this comment.
Yeah, it's a bad name. Somewhat intentionally, because I think the Rendering Methods Task Force needs to discuss the risks (ht threat model!) around the sandbox handing generated PDF content back to the viewer/wallet UX. That may be fine, but we should write up the threat modeling--including just raw size/waiting that will likely happen in a complex credential rendering.
The
credential.jsonfile can be tested on https://digitalbazaar.github.io/vc-viewer/ after digitalbazaar/vc-viewer#15 is merged.