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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156