PDF Template Change for Vaccine Certificates via ETCD CLI
Any template-related changes can be done by updating the HTML template using ETCD CLI. Before making any change, the PDF template will look like:
![](https://divoc.digit.org/~gitbook/image?url=https%3A%2F%2F1377276962-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyZ3Mr7sicTlPeSsH6Scq%252Fuploads%252F2BrKJ2RxseTPuDzsPNhJ%252FScreenshot%25202022-09-01%2520at%252012.13.18%2520PM.png%3Falt%3Dmedia%26token%3D5ec92d1d-f554-4152-886b-9a9b085b2e72&width=768&dpr=4&quality=100&sign=ec9e6dbe&sv=1)
Example: Adding a field such as ‘nationality’ to the PDF template.
Steps to add 'nationality' to the PDF template:
Go to the specific path where etcd is configured.
Open the file to add the new field that will get displayed in the template (vim vaccineCertificateTemplate.html).
![](https://divoc.digit.org/~gitbook/image?url=https%3A%2F%2F1377276962-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyZ3Mr7sicTlPeSsH6Scq%252Fuploads%252FiTtuKvYugrS4EBy7VRBe%252FScreenshot%25202022-09-01%2520at%252012.16.34%2520PM.png%3Falt%3Dmedia%26token%3D04c44288-3f3a-4e2f-b167-5e90ba0ff1b6&width=768&dpr=4&quality=100&sign=812b4d32&sv=1)
To reflect the change, run the updateConfigs shell script using the command: ./updateConfigs.sh. It shows "OK OK OK...." This means that etcd has been updated with the new template successfully.
![](https://divoc.digit.org/~gitbook/image?url=https%3A%2F%2F1377276962-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyZ3Mr7sicTlPeSsH6Scq%252Fuploads%252FRaFT1XOGMP7M11qtE3JH%252FScreenshot%25202022-09-01%2520at%252012.18.36%2520PM.png%3Falt%3Dmedia%26token%3Ddb8b945b-449c-489b-a029-99a42aa9b2f4&width=768&dpr=4&quality=100&sign=786fbdae&sv=1)
Generate the PDF again using GET API.
![](https://divoc.digit.org/~gitbook/image?url=https%3A%2F%2F1377276962-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FyZ3Mr7sicTlPeSsH6Scq%252Fuploads%252FbTa1q5z1seDRWTBQIAB4%252FScreenshot%25202022-09-01%2520at%252012.20.04%2520PM.png%3Falt%3Dmedia%26token%3D3f6647f6-cd79-49e4-b434-beaf04ad3163&width=768&dpr=4&quality=100&sign=f0e66042&sv=1)
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Last updated