Question
Barcode Generation in Pega using only client side Javascript code
How do we Generate a Barcode in Pega using only client side Javascript code. Given that we know the size of the barcode and the barcode number.
There is a github project for generation of barcode using a javascript. Can we copy this code into our pega application and generate the barcode. How will that work, if I don't want to be dependent on the github code. i.e how do i copy the entire code into my application so that all the code is in our environment and there is no dependency on Pega
If anyone has a better approach, please update on this thread.
Hey guys.. I found a workaround to this problem. We have to create a Java step in an activity and in the Java code we can use the existing lowagie or itext libraries that are a part of the product and use the library functions to generate the Barcode ( refer http://itextpdf.com/ for he documentation ) once this barcode is generated, convert it into an image and then you can either
1. assign the java image to a parameter or a property on the step page
2. convert the image into a byte array and then into Base64 code in Java code itself and then assign that Base64 encoded string to a parameter or a property of the step page. Then apply the Base64 decoding available as a library function in Pega expression builder to convert it back to an image.