axxshodiq / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

problem printing big invoices on jzebra #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I change the print Pages function to this, just add more text, and the printer 
get stuck, on the number 13. Any ideas??, am i doing something wrong.

function printPages() {
         var applet = document.jZebra;
         if (applet != null) {
            applet.append("A590,1600,2,3,1,1,N,\"jZebra 1\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 2\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 3\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 4\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 5\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 6\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 7\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 8\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

            applet.append("A590,1600,2,3,1,1,N,\"jZebra 9\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 10\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 11\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 12\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 13\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 14\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 15\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 16\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 17\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

                        applet.append("A590,1600,2,3,1,1,N,\"jZebra 18\"\n");
            applet.append("A590,1570,2,3,1,1,N,\"Testing the printPages() function\"\n");
            applet.append("P1\n");

 // Mark the end of a label, in this case  P1 plus a newline character
            // jZebra knows to look for this and treat this as the end of a "page"
            // for better control of larger spooled jobs (i.e. 50+ labels)
            // i.e. applet.setEndOfDocument("P1\n");
            applet.setEndOfDocument(unescape(document.getElementById("endField").value));

            // The amount of labels to spool to the printer at a time. When
            // jZebra counts this many `EndOfDocument`'s, a new print job will 
            // automatically be spooled to the printer and counting will start
            // over.
            // i.e. applet.setDocumentsPerSpool("3");
            applet.setDocumentsPerSpool(document.getElementById("spoolField").value);

            // Send characters/raw commands to printer
            applet.print();

         }
         monitorPrinting();
      }

What is the expected output? What do you see instead?
i was wating jzebra to print all the domcument

What version of the product are you using? On what operating system?
1.4.6

Please provide any additional information below.
can not print big info invoices

Original issue reported on code.google.com by davi...@gmail.com on 10 Dec 2012 at 4:57

GoogleCodeExporter commented 8 years ago
Can you provide an example of what you are putting in "endField"?

Normally, I suggest writing directly to the printer (bypass the spooler) when 
setting up the printer in Windows, but if you are spooling this many documents, 
you may want to spool documents before printing.

How is the printer configured now?

-Tres

Original comment by tres.fin...@gmail.com on 10 Dec 2012 at 6:28