w3c-ccg / vc-ed

Verifiable Credentials for Education Task Force

Home Page:https://w3c-ccg.github.io/vc-ed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extracting data in a pdf format from a VC

Sakurann opened this issue · comments

How can the verifier reproduce a pdf record from the set of values below, given in the payload example in section 1.5.3.1?
Is there a standard protocol that can be used to extract the data in pdf format from "data" claim?

{
      "POCid": "did:example:ebfeb1f712ebc6f1c276e12ec23",
      "payload": {
        "format": "application/pdf",
        "data": "H4sICMr5oF4CA2Zha2VfY2VydC5wZGYA7L0H3CxJWS6uIEgQAQmCi[...]"
 }

I'm not sure I understand the question of a "standard protocol", but I am assuming that the question is how to get the PDF from that example.

I'll note that the example in section 1.5.3.1 is using the property name data instead of payloadRecord that LER Wrapper document uses (second payload in the linked example).

The payload.data property is a base64 encoded string. To get the file one would decode the base64 string stored in data and then treat the result as the mime type provided in the format property (which in this case is application/pdf).

The example in section 1.5.3.1 does not include a full PDF file in the data property, the [...] represents that there is more data but not being provided for brievity.

@Sakurann - what do you think of @roverwolf's answer? Do you have any follow-up questions? If not, may I close this ticket?

This may also be related to the general purpose mechanism of linking to non-VC resources (images, PDFs) from inside a VC: w3c/vc-data-model#831

The task force decided to close this issue as it was related to the LER Wrapper recommendation. As @dmitrizagidulin notes above, linking to non-VC resources is being explored in another issue at CCG.