web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Unable to generate QR Code using POS Print Utility

(0) ShareShare
ReportReport
Posted on by
sender.PrintBarcode(getQR(), 0, 0, 'QRCODE', 2);

FieldValue[1] := 'Scan this QR code to give us feedback';
sender.PrintLine(Tray, sender.FormatLine(sender.FormatStr(FieldValue, DSTR1), false, false, false, false));
NodeName[1] := 'Feedback Message';
sender.AddPrintLine(250, 1, NodeName, FieldValue, DSTR1, false, false, false, false, Tray);
The getQR method is:

local procedure getQR(): Text
    var
        Base64Convert: Codeunit "Base64 Convert";
        TempBlob: Codeunit "Temp Blob";
        Client: HttpClient;
        Response: HttpResponseMessage;
        Instr: InStream;

        URL: Text;
        TypeHelper: Codeunit "Type Helper";
    begin
        URL := 'https://....';

        Client.Get('barcode.tec-it.com/barcode.ashx' + TypeHelper.UrlEncode(URL) + '&code=QRCode', Response);
        TempBlob.CreateInStream(Instr);
        Response.Content().ReadAs(Instr);

        EncodeStr := Base64Convert.ToBase64(Instr);
        exit(URL);
    end;


I'm not able to generate QR Code. By using the print Barcode method from POS PRINT Utility codeunit. I've called the method from event OnBeforePrintKotLine. And I want to print the QR Code in Kot.

I tried saving QR image by downloading it from online websites and use PrintBitmap instead of PrintBarcode. But that didn't work. Can anyone help me with this. I also don't have ID Automation License.

PS: The sender refer to "LSC Print POS Utility" Codeunit.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 653 Super User 2026 Season 1

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 414 Most Valuable Professional

#3
YUN ZHU Profile Picture

YUN ZHU 394 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans