-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Planning Issue - Create PDF from one or more shared credentials #417
Comments
@dmitrizagidulin & @jchartrand - let's discuss at next sprint meeting re: admin dashboard discussion. |
Adding in some points made in Slack:
|
Some quick reactions
Question: Do we always need something like VerifierPlus, or other external storage location, if we generate a PDF/PNG because the credential will almost always be bigger than what we can store in JSON encoded as a QR code? |
One thing to note is that whether the issuer provides a PDF or an image, we still probably want to dynamically add the QR from the wallet. Because if the issuer adds it (at issuance time), that means they likely have to provide hosting for the credential, and:
Note too that my guess is that some issuers won't provide either a png or a pdf, and so we might want a 'generic' PDF option that just transcribes metadata from the VC into the displayed PDF in some way (propertyName: propertyValue?), along with a QR. With a message like, "This data is reproduced from the verifiable credential, which itself is embedded in this credential" or something like that. And maybe (@dmitrizagidulin) this is where the renderMethod might specify which fields should be shown in the generated PDF, possibly also with things like display names to use for properties, which property to use as a header logo, or maybe the renderMethod itself specifies a url for a logo image, etc.? |
Adding another thought - if the wallet prints the PDF based on a rendering suggestion by the institution, other wallets will be able to do this too. |
How feasible is it to have a renderMethod that describes a layout in terms of positioning and size, so like:
And then a wallet could use whatever software they want to generate a PDF, or to generate a PNG, or even an html page. I'm guessing the allowed instructions would have to be very constrained, but maybe that is okay for generating a basic PDF? This approach would still leave issuers with the option of simply saying that the entire page should be taken up with a single image they provide that contains their pre-rendered credential display. As an example of where someone has done something similar, this project takes a LaTeX typeset document and renders it to a PDF, all with javascript: http://manuels.github.io/texlive.js/ Note that demo site worked for me in Firefox, but not Safari where although it seemed to generate the pdf, it didn't open it properly. It would even be pretty cool to have a LaTeX renderMethod. |
Plan for this issue:
{ }
Example javascript code that converts from SVG to PDF: https://codepen.io/eyaylagul/pen/XoNMYE
Issues to create:
|
Generate a PDF from one or more credentials a user has chosen to share. Include support for prefered credential display (e.g., PDF, PNG/JPEG/image, etc.)
The text was updated successfully, but these errors were encountered: