PDF Template Management
Introduction
This guide will step through how to manage a PDF template, which is required to be used to generate a digital PDF file of the compact or semantic compact credentials.
Prerequisites
You need the following in order to proceed with this tutorial:
Access to the MATTR VII APIs
A PDF template named template.zip
If you’re experiencing any difficulties, contact us.
Record a PDF Template
The API takes a binary template.zip bundle file in the request. The response contains a returned template id with the settings provided in the config.json file of the template bundle. The id can be used in PDF generation flow as a templateId in the API request.
Compact Credential
Request
1POST
2https://YOUR_TENANT_URL/core/v2/credentials/compact/pdf/templates
3Header: Content-Type: application/zip
Semantic Compact Credential
Request
1POST
2https://YOUR_TENANT_URL/core/v2/credentials/compact-semantic/pdf/templates
3Header: Content-Type: application/zip
Possible Errors
Errors may occur in the following scenarios:
unable to decompress the bundle
either template.pdf or config.json is missing from the bundle
either template.pdf or config.json is malformed
a custom font is required but the font file is not provided in template.zip
either template.zip or template.pdf file exceeds the maximum size allowed
when isRequired is true in config.json but the key is not found in template.pdf