Certificate Display


#1

I have several questions regarding the display of certificate, both on the web and on the mobile app.

  1. For the displayHTML field, do we need to hardcode the layout of the certificate?
  2. Can we make use of cert-viewer to design and embed the layout into the certificate? If yes, how to do that?
  3. I looked at the sample issued certificates which come with embedded layouts, when I look at the JSON file, there isn’t any displayHTML field on it, I am curious how that is achieved.

Thanks for the help!


#2

Roughly speaking, yes, at least a template.

Cert-tools has the concept of replacing certificate variables with values in the roaster file. So you may either create a certificate template that has displayHtml hardcoded to be the same for each person, or you can add displayHtml to one of the variables that gets replaced.

For the latter option, you’d need to create your own functionality that dynamically creates the displayHtml uniquely for each person and sticks that in the roaster file. Or fork cert-tools and create the code needed to replace displayHtml elements with roster specific information, such as name.

Easiest option would be to just create the html like you would normally and insert that as your template (or whatever custom tool you use to dynamically create html).

I’m not sure which files you are looking at but there are some here with display html: https://github.com/blockchain-certificates/cert-verifier-js/tree/master/test/fixtures