/
Certificate Generation

Certificate Generation

The final step in this process is the creation of configs to create a voter registration PDF for the citizens to download. For this, we will make use of DIGIT’s PDF service which uses PDFMake and Mustache libraries to generate PDF. A detailed documentation on PDF service and generating PDFs using PDF service can be found here - PDF Generation Service.

For our guide, we will follow the following steps to set up PDF service locally and generate PDF for our voter registration service -

i) Clone DIGIT Services repo.

> git clone -o upstream https://github.com/egovernments/DIGIT-Dev

ii) Clone Configs repo.

> git clone -o upstream https://github.com/egovernments/configs

iii) Now, go into the DIGIT-Dev repo and open up a terminal. Checkout DIGIT_DEVELOPER_GUIDE branch.

> cd DIGIT-Dev > git checkout DIGIT_DEVELOPER_GUIDE

iv) Now, go inside configs folder and under pdf-service data config and format config folders, create file by the name of digit-developer-guide.json

Add the following content in this newly created data config file -

v) Now, under format-config folder, again create a file by the name of digit-developer-guide.json and put the following content into it -

vi) Now, open PDF service (under core-services repository of DIGIT-Dev) on your IDE. Open Environment.js file and change the following properties to point to the local config files that have been created. For example, in my local setup I have pointed these to the local files that I created -

vii) Now, make sure that kafka and workflow services are running locally and port-forward the following services -

egov-user to port 8284

egov-localization to port 8286

egov-filestore to 8288

egov-mdms to 8082

viii) PDF service is now ready to be started up. Execute the following commands to start it up -

ix) Once PDF service is up hit the following cURL to look at the created PDF -

Related content

Adding Persister Configuration
Adding Persister Configuration
Read with this
Integration of PDF in UI for download and print PDF
Integration of PDF in UI for download and print PDF
More like this
Prerequisites and local development setup
Prerequisites and local development setup
Read with this
Customizing PDF Receipts & Certificates
Customizing PDF Receipts & Certificates
More like this
Adding Indexer Configuration
Adding Indexer Configuration
Read with this
Generation of Acknowledgement PDF
Generation of Acknowledgement PDF
More like this