Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
KikoAmaya Absent Member.
Absent Member.

Code QR

How to generate QR code and convert it to jpg file ?? to print

Thank you
Tags (1)
2 Replies
Chuck Edgin Absent Member.
Absent Member.

RE: Code QR

What  version of ACUCOBOL are you using? If you're on version 9.x or later, you might consider calling an online web service using the RMNet library support in the ACUCOBOL runtime.

However, if you do so, you'll want to use a service that can return the QR image in the SVG file format, which is text-based (specifically, XML). You need to do this because, unfortunately, RMNet doesn't currently handle binary formats like GIF, PNG, and JPG.

I googled using the search terms "qr code generator web service" and the first result provided this capability.

Once you've retrieved the image, you can open it with a web browser or other software for printing.

Have a look at the sample code I just provided on another post on this forum as a reference for using the RMNet HttpGet function.

RobertRedekop Trusted Contributor.
Trusted Contributor.

RE: Code QR

Another alternative is to use ghostscript and the postscipt barcode libraries found here:

I used the library and it works well. I've not done this specific option, but there is a jpeg output option to ghostscript. The difficulty is you need to know enough postscript to pump out your QR info as (.. qr text...) and add a showpage command. Note: under windows, this is not quick (4-10 seconds). Better in linux.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.