Skip to content

Add pdfmake-based PDF download example.#140

Open
BigBlueHat wants to merge 2 commits into
mainfrom
pdfmake
Open

Add pdfmake-based PDF download example.#140
BigBlueHat wants to merge 2 commits into
mainfrom
pdfmake

Conversation

@BigBlueHat

@BigBlueHat BigBlueHat commented May 19, 2026

Copy link
Copy Markdown
Contributor

The credential.json file can be tested on https://digitalbazaar.github.io/vc-viewer/ after digitalbazaar/vc-viewer#15 is merged.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 19, 2026

Copy link
Copy Markdown

Deploying vc-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92c23d9
Status: ✅  Deploy successful!
Preview URL: https://f3dc7748.vc-examples.pages.dev
Branch Preview URL: https://pdfmake.vc-examples.pages.dev

View logs

@dlongley dlongley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BigBlueHat BigBlueHat Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants