Generate QR code from Pega
This is a small experiment on how to generate a QR code using
Pega. For this, we need a Zebra Crossing library(jar) to import into Pega and use those classes to create a QR code image (png) from Pega. It is available from the Maven
repository given below (just use a browser
to download it) and use the Import feature from Pega.
The main steps we need to follow in Pega to work on this exercise:
1) Build a Pega function (RUF): GenerateQRCode with the java code to generate the QR code image. This RUF needs few parameters like file type, text to use, width & height of the images.
2) Build another Pega function (RUF): GetFileName with the java code to get the random file name using SHA1 checksum of the image.
3) Build the logic in the activity: GenerateQRCode by using the above 2 steps and render the QR image in a HTML screen popup using Show-HTML from the activity.
Here is the snapshot of the activity with the above mentioned steps.
References:
1. https://www.google.com/
2. https://community.pega.com/
3. https://repo1.maven.org
