(epson tm-t20ii) print multiple html files with qz-print

I tried to print multiple html files in folder with qz-print and EPSON – TM-T20II, but seem no work.

This is an example of script that i used:

    function printPages() {
if (notReady()) {

qz.appendHTMLFile(getPath() + "misc/out-may-21.html");
qz.appendHTMLFile(getPath() + "misc/out-may-22.html");

while (!qz.isDoneAppending()) {

but it will only print “out-may-22.html” file.
– And one more problem, when printing html file, it print html file, then print one more text file with tag “”.

So confused,

Source: html

1 Comment

  1. Edwin

    The function qz.appendHTMLFile(“…”); is not synchronous and cannot currently be called in succession.

    Instead, you’ll have to wait until qzDoneAppending() is called, then call printHTML(), then call qz.appendHTMLFile(“…”); again, etc.


    // Called automatically when the software has loaded
    function qzReady() {

    // Called automatically when the software has finished searching for the printer
    function qzDoneFinding() {
    // append first file

    var secondHasAppended= false;

    // Called automatically when a file is done appending
    function qzDoneAppending() {

    // Called automatically when document has been sent to the printer
    function qzDonePrinting() {
    if (!secondHasAppended) {
    secondHasAppended = true;
    // qzDoneAppending and qzDonePrinting will take care of the rest
    } else {

    If you require more than two documents, replace the boolean with a counter.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.