Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QR Code Micros 3700 Receipt Printing

Status
Not open for further replies.

Wildbar

Technical User
Oct 15, 2004
1,013
CA
Trying to add a QR Code bitmap to our customer receipts. My bit map is less then 3kb I have added it as a trailer bitmap. It prints ok The issue is it takes about 4 to 5 seconds to load and print the bitmap at the receipt printers each time. As we are a very busy place I am now on the servers most hated list. Our bitmap logo at the top of the receipt prints right away, and is bigger. Any ideas on the issue? Should I try printing it through a SIM instead? The printers are Epson T88 II
 
The printer will only store one image in memory at a time as far as I'm aware. Put the QR Code at the top and just make the logo + code one image?
 
Thanks I did not know that. I'll try dropping our logo during toe QRcode promotion.
Thanks again.
 
I'm not positive about that, but I spent a while trying to get a SIM I had working on 9700 which printed QR Code just like you would Barcodes (no bitmap) until I realized that 3700 has no @nul system variable. Drat!
 
So you are correct. Printing the 1 logo (the qrcode) works fine and at normal speeds We have dropped the header logo for now.
 
Sorry for dragging up an old thread, but Moregelen would you be willing to share that SIM for 9700 which prints the QR Code like barcodes.

I've been trying to get this working in the past without success.

Thanks


Do you want some custom SIM scripts developed. Contact me via my website
 
I don't have the SIM itself anymore; we sell 9700 so rarely I just scrapped it. I do however have all of the printer command codes you have to send still. I'll post them when I get home tonight.
 
Ok so I stopped in my office to print some things so let me throw this up now..

Just a simple little program I wrote back when I was testing on a TM-88. Wrote it this way because it is easier to debug than a SIM file. You'll have to convert it to SIM, but should be easy; the only reason this didn't work on 3700 is because unlike with 9700 which has @NUL, there is no way to send a null to the printer, which is a necessary control character. If you find a way around that in 3700 I would loooove to hear it.

Code:
[COLOR=#0000FF][/color][COLOR=#0000FF][highlight #FFFFFF]        static[/color][COLOR=#000000] [/color][COLOR=#0000FF]void[/color][COLOR=#000000] PrintQRCode([/color][COLOR=#0000FF]string[/color][COLOR=#000000] qr_code)
        {
            [/color][COLOR=#2B91AF]ASCIIEncoding[/color][COLOR=#000000] encoder = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#2B91AF]ASCIIEncoding[/color][COLOR=#000000]();
            [/color][COLOR=#2B91AF]SerialPort[/color][COLOR=#000000] sp = GetSerialPort();
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] storeQRCode = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 
                0x1D, 0x28, 0x6B, ([/color][COLOR=#0000FF]byte[/color][COLOR=#000000])(qr_code.Length + 3), 0x00, 0x31, 0x50, 0x30 
            };
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] modQRCode = { 0x1D, 0x28, 0x6B, 0x04, 0x00, 0x31, 0x41, 0x32, 0x00 };
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] sizeQRCode = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x43, 0x07 };
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] printQRCode = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x51, 0x30 };
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] feedAndCut = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 27, 64, 0xA, 0x1d, 0x56, 66, 30 };
            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] centerPrint = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 0x1b, 0x61, 0x01 };

            System.IO.[/color][COLOR=#2B91AF]File[/color][COLOR=#000000].AppendAllText([/color][COLOR=#A31515]@"C:\temp\Serial2.txt"[/color][COLOR=#000000], [/color][COLOR=#A31515]"\r\n"[/color][COLOR=#000000] + encoder.GetString(storeQRCode) + qr_code);
            System.IO.[/color][COLOR=#2B91AF]File[/color][COLOR=#000000].AppendAllText([/color][COLOR=#A31515]@"C:\temp\Serial2.txt"[/color][COLOR=#000000], [/color][COLOR=#A31515]"\r\n"[/color][COLOR=#000000] + encoder.GetString(printQRCode));
            sp.Write(storeQRCode, 0, storeQRCode.Length);
            sp.Write(qr_code);
            sp.Write(modQRCode, 0, modQRCode.Length);
            sp.Write(sizeQRCode, 0, sizeQRCode.Length);
            sp.Write(centerPrint, 0, centerPrint.Length);
            sp.Write(printQRCode, 0, printQRCode.Length);
            sp.Write(feedAndCut, 0, feedAndCut.Length);

            sp.Close();
        }
        [/color][COLOR=#0000FF]static[/color][COLOR=#000000] [/color][COLOR=#0000FF]void[/color][COLOR=#000000] PrintBarcode([/color][COLOR=#0000FF]string[/color][COLOR=#000000] barcode)
        {
            [/color][COLOR=#2B91AF]SerialPort[/color][COLOR=#000000] _serialPort = GetSerialPort();

            [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] data;


            data = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] {
                27, 64,
                29, 72,
                3,
                29, ([/color][COLOR=#0000FF]byte[/color][COLOR=#000000])[/color][COLOR=#A31515]'h'[/color][COLOR=#000000],
		         80,
		         29, ([/color][COLOR=#0000FF]byte[/color][COLOR=#000000])[/color][COLOR=#A31515]'w'[/color][COLOR=#000000], 3,
		         27, ([/color][COLOR=#0000FF]byte[/color][COLOR=#000000])[/color][COLOR=#A31515]'a'[/color][COLOR=#000000], 1,
                29, ([/color][COLOR=#0000FF]byte[/color][COLOR=#000000])[/color][COLOR=#A31515]'k'[/color][COLOR=#000000],
		         67, 12
            };
            _serialPort.Write(data, 0, data.Length);
            _serialPort.Write(barcode);
            data = [/color][COLOR=#0000FF]new[/color][COLOR=#000000] [/color][COLOR=#0000FF]byte[/color][COLOR=#000000][] { 
                27, 64,
                0xA,
                0x1d, 0x56, 66, 30
            };

            _serialPort.Write(data, 0, data.Length);

            _serialPort.Close();
         }[/color][/highlight]
 
No, what I mean is that by default both 9700 and 3700 strip out null characters (I created a virtual COM port program and watched as the bytes came through). However, in 9700 you can send @NUL which is basically saying, 'Hey, don't strip this NUL character out'. Can't do that in 3700.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top