JimFromCanada
Programmer
A similar question was asked in thread693-1803978
The older SIM manuals (for RES) have examples for printing QR codes.
The code includes the `FormatRaw` command which "allows a SIM script to send up to 2 Kilobytes of raw (un-altered) data to only IDN, Serial, IP, and Bluetooth printers."
I can't seem to find an equivalent for Simphony. It appears as though it may be possible to write raw byte data via C# / .NET if I created a library, but this approach is lacking in documentation details. I can appreciate having to figure out how to write raw data to a printer in C#, but given the simplicity of the older SIM methods it seems like doing this in .NET is a massively-overkill approach for something seemingly so simple.
TL;DR: is there an equivalent for `FormatRaw` and/or are there examples for how to print a QR code manually for Simphony 19.x+?
For posterity, this is a slightly updated version of the print method from the older docs:
(Give or take the backslashes and newlines which don't seem to format nicely in the code block.)
The older SIM manuals (for RES) have examples for printing QR codes.
The code includes the `FormatRaw` command which "allows a SIM script to send up to 2 Kilobytes of raw (un-altered) data to only IDN, Serial, IP, and Bluetooth printers."
I can't seem to find an equivalent for Simphony. It appears as though it may be possible to write raw byte data via C# / .NET if I created a library, but this approach is lacking in documentation details. I can appreciate having to figure out how to write raw data to a printer in C#, but given the simplicity of the older SIM methods it seems like doing this in .NET is a massively-overkill approach for something seemingly so simple.
TL;DR: is there an equivalent for `FormatRaw` and/or are there examples for how to print a QR code manually for Simphony 19.x+?
For posterity, this is a slightly updated version of the print method from the older docs:
Code:
// --
// This is used to test the QR-code printing abilities of any given printer
event INQ : 1
var qrCodeData: A255
var qrCodeDataLen : N3
var rawDataLen: N3
startprint @CHK
FORMAT qrCodeData AS "[URL unfurl="true"]https://qrcode.example.com"[/URL]
qrCodeDataLen = len(qrCodeData) + 3
rawDataLen = len(qrCodeData) + 48
FORMATRAW "ABC", 200, chr(127), rawDataLen, ";", \ chr(13), chr(10), \ chr(27), chr(97), chr(1), \ chr(29), chr(40), chr(107), chr(4), chr(0), chr(49), chr(65), chr(50), chr(0), \ chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(67), chr(9), \ chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(69), chr(48), \ chr(29), chr(40), chr(107), chr(qrCodeDataLen), chr(0), chr(49), chr(80), chr(48), qrCodeData, \ chr(29), chr(40), chr(107), chr(3), chr(0), chr(49), chr(81), chr(48), \ chr(27), chr(64)
printline "Test QR code START"
printline "@@ABC@@"
printline "Test QR code END"
endprint
endevent
(Give or take the backslashes and newlines which don't seem to format nicely in the code block.)