raw printer paper cut

777 views
Skip to first unread message

Jose Guillen

unread,
Jun 12, 2017, 4:25:25 PM6/12/17
to qz-print
Hi, im using windows 7 and an EPSON TMU-220A, everything is ok but i can't find a way to cut paper between jobs, i have to manually cut the paper after each job is printed.
i'm using the raw printer driver that comes with windows (Generic /Text Only Printer).

Tres Finocchiaro

unread,
Jun 12, 2017, 6:03:43 PM6/12/17
to Jose Guillen, qz-print
Jose,

Please see this page... 


There are commands for cutting paper at the bottom of that example.  Does it work?
On Mon, Jun 12, 2017 at 4:25 PM, Jose Guillen <d4m...@gmail.com> wrote:
Hi, im using windows 7 and an EPSON TMU-220A, everything is ok but i can't find a way to cut paper between jobs, i have to manually cut the paper after each job is printed.
i'm using the raw printer driver that comes with windows (Generic /Text Only Printer).

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jose Guillen

unread,
Jun 12, 2017, 6:18:50 PM6/12/17
to qz-print, d4m...@gmail.com
Absolutely fantastic! that line did the work:  '\x1B' + '\x69', // cut paper


El lunes, 12 de junio de 2017, 16:03:43 (UTC-6), Tres Finocchiaro escribió:
Jose,

Please see this page... 


There are commands for cutting paper at the bottom of that example.  Does it work?
On Mon, Jun 12, 2017 at 4:25 PM, Jose Guillen <d4m...@gmail.com> wrote:
Hi, im using windows 7 and an EPSON TMU-220A, everything is ok but i can't find a way to cut paper between jobs, i have to manually cut the paper after each job is printed.
i'm using the raw printer driver that comes with windows (Generic /Text Only Printer).

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.

Paul Ferguson

unread,
Mar 10, 2019, 4:42:13 PM3/10/19
to qz-print
I am trying to use this same command ('\x1B' + '\x69',) but the cut isn't happening.

Perhaps the Epson TM20ii does cut the paper?

I've combined it with other raw data types which are working as expected, including a barcode using the same HEX command format. But it's just not cutting:

var printData = [
    {
        type: 'raw',
        format: 'file',
        data: 'portable_template_top.raw'
    },

    '\x1B' + '\x61' + '\x31', // center align
    // <!-- BEGIN QR DATA -->
    '\x1D' + '\x28' + '\x6B' + '\x04' + '\x00' + '\x31' + '\x41' + '\x32' + '\x00',    // <Function 165> select the model (model 2 is widely supported)
    '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x43' + dots,               // <Function 167> set the size of the module
    '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x45' + '\x30',             // <Function 169> select level of error correction (48,49,50,51) printer-dependent
    '\x1D' + '\x28' + '\x6B' + size1 + size0 + '\x31' + '\x50' + '\x30' + qr,          // <Function 080> send your data (testing 123) to the image storage area in the printer
    '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x51' +'\x30',              // <Function 081> print the symbol data in the symbol storage area
    '\x1D' + '\x28' + '\x6B' + '\x03' + '\x00' + '\x31' + '\x52' +'\x30',              // <Function 082> Transmit the size information of the symbol data in the symbol storage area
    // <!-- END QR DATA -->
    '\x1B' + '\x61' + '\x30', // left align

    {
        type: 'raw',
        format: 'file',
        data: 'portable_template_bottom.raw'
    },    

    '\x1B' + '\x69', // cut paper  
];

Kyle La Barge

unread,
Mar 10, 2019, 5:20:17 PM3/10/19
to Paul Ferguson, qz-print
Hey Paul,

I glanced at the manual for this printer and it supports paper cutting via the driver. Page 68 says:

EPSON Advanced Printer Driver (APD): In addition to ordinary Windows driver functions, this driver has controls specific to POS, such as controls for paper cut, a cash drawer, and customer display. The Status API (Epson original DLL) that monitors printer status and sends ESC/POS commands is also attached to this driver

How have you installed the printer? Are you using the printer driver from the manufacturer, or are you using the generic/text driver? Since this printer offers a driver that supports both raw and pixel printing, I recommend installing the driver. 

If you aren't using the driver, can you please install the driver and see if you're able to use the cut command?

Thanks,

Kyle LaBarge

Paul Ferguson

unread,
Mar 10, 2019, 6:50:56 PM3/10/19
to Kyle La Barge, qz-print
Thanks, Kyle.

I installed the Printer Driver for Mac v1.2b from that link. The installation seemed to work, and I didn't make any other changes, but it still is not cutting.

I initially configured the printer as a raw printer (QZ Tray Support link) if that makes any difference.

Is there anything else I need to do besides running the driver installer?

Thanks!
Paul

Kyle La Barge

unread,
Mar 10, 2019, 7:01:07 PM3/10/19
to Paul Ferguson, qz-print
Hey Paul,

Thanks for the information, it is helpful.

I initially configured the printer as a raw printer (QZ Tray Support link) if that makes any difference.
So to be clear, after you installed the driver from Epson's website, you re-added the printer in CUPS to use the newly installed driver?  

Now that I know you're running macOS, I'd like you test using altPrinting to see if that makes a difference: https://qz.io/wiki/2.0-raw-printing#alternate-printing

altPrinting will bypass the printer driver entirely, regardless of how it is setup in CUPS. We've run into some strange issues with raw printing on macOS that have been resolved by altPrinting.


Kyle LaBarge

Tres Finocchiaro

unread,
Mar 10, 2019, 10:29:07 PM3/10/19
to Kyle La Barge, Paul Ferguson, qz-print
The programming guide for this printer specifically lists  '\x1B' + '\x69' (or more properly "ESC i") as "Deprecated, will be removed in a future version" and recommends  '\x1D' + '\x56' (or more properly "GS V") instead.

The command must be either 3 params (including GS V).  Don't let tet the "m" and "n" confuse you.  It only takes a 3rd parameter, it just varies between models apparently.

Can you test this?

'\x1D' + '\x56'  + '\x00' // full cut
'\x1D' + '\x56'  + '\x30' // full cut

'\x1D' + '\x56'  + '\x01' // partial cut
'\x1D' + '\x56'  + '\x31' // partial cut

I've attached the relevant portion from Epson's website in PDF format.  Note, other parameters can influence things like auto-feed before cut and auto-feed after cut.

image.png

Disclaimer: The PDF is copyright Seiko/Epson and is used here in small portion under Fair Use clause (educational exception) of the U.S. DMCA.



GS V - TM Printer - ESC_POS Command - Tech.Reference - POS - Epson.pdf

Paul Ferguson

unread,
Mar 11, 2019, 11:05:19 AM3/11/19
to Tres Finocchiaro, Kyle La Barge, qz-print
Hello Tres and Kyle,

Thank you both for your quick responses.

I must admit, I think this was my mistake in the first place, as I was testing a function without the paper cut command when I thought I was testing a function with it.

After fixing that underlying mistake - the original cut command worked!

But I took it one step further, and I tested all 4 of the commands Tres shared, and they all worked also. They all made a cut. The cut was nearly complete on all 4 commands, and I can barely tell the difference between a "partial cut" and a "full cut". But it works, so thank you!

--Paul

Tres Finocchiaro

unread,
Mar 11, 2019, 11:15:46 AM3/11/19
to Paul Ferguson, Kyle La Barge, qz-print
But I took it one step further, and I tested all 4 of the commands Tres shared, and they all worked also. They all made a cut. The cut was nearly complete on all 4 commands, and I can barely tell the difference between a "partial cut" and a "full cut". But it works, so thank you!  

Thanks kindly for testing.  We'll add this new code to our documentation.

 

Reply all
Reply to author
Forward
0 new messages