Zebra TLP 2844 printer refusing to print too many lines - printing
I'm trying to print some vouchers with variable length on continuous paper. The problem is that the printer refuses to print anything beyond around 2300 points (approximately 26 cm or 10.4 inches) and just pretends it's not there. Very light code triggers the problem, so it's not a buffer issue. The printer also manages to read the "print" command and all the lines are formatted exactly the same, so it's not a formatting issue either. Here's a not quite minimal, but almost, example of code that illustrates my point:
N //clear buffer
Q10,0 //set paper to continuous mode with 10 points between documents
R0,0 //set reference point
ZT //print from top to bottom
A100,50,0,1,1,2,N,"ASDFQWERTY 50"
A100,100,0,1,1,2,N,"ASDFQWERTY 100"
A100,150,0,1,1,2,N,"ASDFQWERTY 150"
A100,200,0,1,1,2,N,"ASDFQWERTY 200"
A100,250,0,1,1,2,N,"ASDFQWERTY 250"
A100,300,0,1,1,2,N,"ASDFQWERTY 300"
A100,350,0,1,1,2,N,"ASDFQWERTY 350"
A100,400,0,1,1,2,N,"ASDFQWERTY 400"
A100,450,0,1,1,2,N,"ASDFQWERTY 450"
A100,500,0,1,1,2,N,"ASDFQWERTY 500"
A100,550,0,1,1,2,N,"ASDFQWERTY 550"
A100,600,0,1,1,2,N,"ASDFQWERTY 600"
A100,650,0,1,1,2,N,"ASDFQWERTY 650"
A100,700,0,1,1,2,N,"ASDFQWERTY 700"
A100,750,0,1,1,2,N,"ASDFQWERTY 750"
A100,800,0,1,1,2,N,"ASDFQWERTY 800"
A100,850,0,1,1,2,N,"ASDFQWERTY 850"
A100,900,0,1,1,2,N,"ASDFQWERTY 900"
A100,950,0,1,1,2,N,"ASDFQWERTY 950"
A100,1000,0,1,1,2,N,"ASDFQWERTY 1000"
A100,1050,0,1,1,2,N,"ASDFQWERTY 1050"
A100,1100,0,1,1,2,N,"ASDFQWERTY 1100"
A100,1150,0,1,1,2,N,"ASDFQWERTY 1150"
A100,1200,0,1,1,2,N,"ASDFQWERTY 1200"
A100,1250,0,1,1,2,N,"ASDFQWERTY 1250"
A100,1300,0,1,1,2,N,"ASDFQWERTY 1300"
A100,1350,0,1,1,2,N,"ASDFQWERTY 1350"
A100,1400,0,1,1,2,N,"ASDFQWERTY 1400"
A100,1450,0,1,1,2,N,"ASDFQWERTY 1450"
A100,1500,0,1,1,2,N,"ASDFQWERTY 1500"
A100,1550,0,1,1,2,N,"ASDFQWERTY 1550"
A100,1600,0,1,1,2,N,"ASDFQWERTY 1600"
A100,1650,0,1,1,2,N,"ASDFQWERTY 1650"
A100,1700,0,1,1,2,N,"ASDFQWERTY 1700"
A100,1750,0,1,1,2,N,"ASDFQWERTY 1750"
A100,1800,0,1,1,2,N,"ASDFQWERTY 1800"
A100,1850,0,1,1,2,N,"ASDFQWERTY 1850"
A100,1900,0,1,1,2,N,"ASDFQWERTY 1900"
A100,1950,0,1,1,2,N,"ASDFQWERTY 1950"
A100,2000,0,1,1,2,N,"ASDFQWERTY 2000"
A100,2050,0,1,1,2,N,"ASDFQWERTY 2050"
A100,2100,0,1,1,2,N,"ASDFQWERTY 2100"
A100,2150,0,1,1,2,N,"ASDFQWERTY 2150"
A100,2200,0,1,1,2,N,"ASDFQWERTY 2200"
A100,2250,0,1,1,2,N,"ASDFQWERTY 2250"
A100,2300,0,1,1,2,N,"ASDFQWERTY 2300"
A100,2350,0,1,1,2,N,"ASDFQWERTY 2350"
A100,2400,0,1,1,2,N,"ASDFQWERTY 2400"
A100,2450,0,1,1,2,N,"ASDFQWERTY 2450"
A100,2500,0,1,1,2,N,"ASDFQWERTY 2500"
A100,2550,0,1,1,2,N,"ASDFQWERTY 2550"
A100,2600,0,1,1,2,N,"ASDFQWERTY 2600"
A100,2650,0,1,1,2,N,"ASDFQWERTY 2650"
A100,2700,0,1,1,2,N,"ASDFQWERTY 2700"
A100,2750,0,1,1,2,N,"ASDFQWERTY 2750"
A100,2800,0,1,1,2,N,"ASDFQWERTY 2800"
A100,2850,0,1,1,2,N,"ASDFQWERTY 2850"
A100,2900,0,1,1,2,N,"ASDFQWERTY 2900"
A100,2950,0,1,1,2,N,"ASDFQWERTY 2950"
A100,3000,0,1,1,2,N,"ASDFQWERTY 3000"
P1
There's a blank line before the first "N", as specified in the EPL2 manual (http://www.zebra.com/content/dam/zebra/manuals/en-us/printer/epl2-pm-en.pdf). I also don't include comments when sending the commands to the printer. However, this only prints until the line that says "ASDFQWERTY 2300" and ignores everything beyond that. Any help is greately appreciated.
Answering myself from a support email I got from the company. This printer model is limited to 11 inches, so in the end I had to split the document onto several requests.
Related
Print QR-Code with curent EPC-number from RFID label to Printronix T4000
we bought a Printronix RFID printer T4304 with these dates: FirmwareP301189 V1.21A Serial NumberT4K431948007 Our wish is to produce RFID-Labels with an QR-Code which includes the EPC-number of the label. The QR-Code shall look like this: http://qr.mycompany.com/epc/E280689123456789012345 We were hoping to use it with the Software Nicelabel. But Nicelabel is only able to produce a QR-Code with only the EPC-Number but not with our http://qr.my..../epc/ in front. I had the idea to save the printjob as file. So I was able to manipulate the file and send that file as printjob to the Printronix printer like this: lpr -S 192.168.1.2 -P raw myprintjob.prn I found the document PTX_PRM_PGL_P7_253642C.pdf which describes how the printer language is working. But I cannot fulfill my destination. My myprintjob.prn looks like this: !PTX_SETUP ENGINE-IMAGE_SHFT_H;0 ENGINE-IMAGE_SHFT_V;0 ENGINE-WIDTH;04146. PTX_END ~NORMAL ~PIOFF ~DELETE LOGO;*ALL ~PAPER;INTENSITY 8;MEDIA 1;FEED SHIFT 0;CUT 0;PAUSE 0;TYPE 0;LABELS 2;SPEED IPS 6;SLEW IPS 6 ~CREATE;FRM;99 SCALE;DOT;300;300 RFRTAG;96;EPC 96;DF511;H STOP ISET;0 FONT;FACE 92250 ALPHA AF511;24;INV;POINT;329;1033;10;10; STOP BARCODE QRCODE;INV;XD9;T2;E0;I1;95;843; "http://qr.mycompany.com/epc/","EPCCODE" STOP END ~EXECUTE;FRM ~REPEAT;1 ~AF511;<DF511> ~NORMAL The result is a QRcode which only includes the first part of the string: "http://qr.mycompany.com/epc/" but not the "EPCCODE". I am looking for a hint how to do this. Maybe I could find out the EPC-code via REST or telnet or so and create a special printjob for every single label? Thanks for your help, Richard
Printronix T4000, talk with port 9100 to get info from the printer Author Richard Lippmann, Stadt Zirndorf, EDV Documentinformation name: talk-with-port9100-to-get-infos-from-printronix-rfid-printer.md revision: 2021-12-02 - init What I want to achieve I want to know the RFID-code from the label which is under the print-head. With this information I am able to build a printjob with Qrcode which includes the RFID-EPC. I was not able to find out how to create a print-job with a qr-code. I do not want this information in qrcode: ABC1234...567 But I want this information in qrcode: http://qr.mydomain.com/rfid/epc/ABC1234...567 With that I am able to take a picture of the label and go to a web-application which helps me further with the device the label is on. Documenation, where to find information The printer language is described in the document which is easy to google: PTX_PRM_PGL_P7_253642C.pdf My environment Printronix T4000 printer with RFID-unit to read the RFID from the current label. How to get info back from my printer Usually Port 9100 is used to send a printjob to the Printronix-printer. Send job, don't receive data. But you can switch the printer to be verbose, to send you back information over the 9100-connection. Glossary EPC = this is the unique number which is in every RFID-label, just like a MAC-address in a network card PGL = the printer language. We can send printjobs with it, but also get information from the printer about Configuration etc. Human connect to the printer via Linux commandline ssh me#shell.mydomain.com export MYPRINTER=192.168.100.3 nc -v $MYPRINTER 9100 Put verbose mode on The printer usually only receives information, but does not talk back. You have to switch on the back-communication. ~CONFIG SNOOP;STATUS END Put verbose mode off I you are programming this interface with a programming language like python, perl, ... it's a good idea to switch verbose mode off after you did your job. ~CONFIG SNOOP;OFF END IDENTITY To see information: put verbose mode on send ~IDENTITY command put verbose mode off ~CONFIG SNOOP;STATUS END ~IDENTITY The result is: T43040,V1.21A,12,131072KB STATUS To see information: put verbose mode on send ~IDENTITY command put verbose mode off ~CONFIG SNOOP;STATUS END ~STATUS The result is: BUSY;0 PAPER;0 RIBBON;0 PRINT HEAD;0 COUNT;000 GAP;0 HEAD HOT;0 CUT COUNT;000000000 PRINT DIST;000001529 PRCT COMPLETE;000 TOF SYNCED;1 SENSED DIST;00450 END Read one RFID-EPC-code from current label These are things mentioned in this command: ~CREATE - start creating a new "form" (or subroutine to execute later) VERIFY - the name of the subroutine we are creating. Keep it simple, less than 15 characters, no special signs (see docu PTX_PRM_PGL_P7_253642C page 60 under "CREATE" and page 29 under "Form Name" for exact informations) NOMOTION - don't move the label to the next one after executing this job DF511 = This is a variable-name, there seem to be a lot of variables in the printer which are called by their numbers: DF1, DF2, ... I don't know which one I am allowed to use, DF511 seems to work 96 = the RFID-EPC on my labels are 96 Bits long H = Hexnumbers, the code is 96 Bit long, but I would like to see it like this: ABC1234...567 VERIFY - a command to send information to the commandline. ~EXECUTE;VERIFY;1 - execute the form 1 time ~CONFIG SNOOP;STATUS END ~CREATE;VERIFY;432;NOMOTION RFRTAG;96;EPC 96;DF511;H STOP VERIFY;DF511;H;*STARTEPC=*;*=ENDEPC\n* END ~EXECUTE;VERIFY;1 ~NORMAL The result is: STARTEPC=E28068940000501EC931EC87=ENDEPC Read two RFID-EPC-codes Reads 2 Barcodes and gives back the EPC-codes. With this command the label get sent (moved) through the printer. These are things mentioned in this command: ~CREATE - start creating a new "form" (or subroutine to execute later) VERIFY - the name of the subroutine we are creating. Keep it simple, less than 15 characters, no special signs (see docu PTX_PRM_PGL_P7_253642C page 60 under "CREATE" and page 29 under "Form Name" for exact informations) NOMOTION - don't move the label to the next one after executing this job DF511 = This is a variable-name, there seem to be a lot of variables in the printer which are called by their numbers: DF1, DF2, ... I don't know which one I am allowed to use, DF511 seems to work 96 = the RFID-EPC on my labels are 96 Bits long H = Hexnumbers, the code is 96 Bit long, but I would like to see it like this: ABC1234...567 VERIFY - a command to send information to the commandline. ~EXECUTE;VERIFY;1 - execute the form 1 time ~CONFIG SNOOP;STATUS END ~CREATE;VERIFY;432 RFRTAG;96;EPC 96;DF511;H STOP VERIFY;DF511;H;*STARTEPC=*;*=ENDEPC\n* END ~EXECUTE;VERIFY;2 ~NORMAL The result is: STARTEPC=E28068940000501EC931EC87=ENDEPC STARTEPC=E28068940000401EC931EC86=ENDEPC
Issue in pexpect when text wraps within session
I am working on a pexpect script that is running populating an output file name and then a prompt for the file's parameters. The program that the script runs asks for Device: then Parameters: always on the same line.... so if the file path-name that is entered for Device is long, sometimes the Parameters prompt wraps to the next line. My code looks like.. child.expect_exact('Device:') child.sendline('/umcfiles/ftp_dir/ftp_peoplesoft/discount/AES_DISCOUNT_15010.TXT') child.expect_exact('Parameters:') This times out.. and here is what is in child.before ' /umcfiles/ftp_dir/ftp_peoplesoft/discount/AES_DISCOUNT_15010.TXT Param\r\neters: "RWSN" => ' so the expect fails... (a child.expect('Parameters:') also fails) How can I ignore the \r\n if it is there, because depending on the length of the path/filename I am using it may not be there at all, or be in a different position. Thanks!
Actually... I found a way to calculate how much is left on the given line, and dynamically set my expect to how much of the Parameter prompt should be visible... seems to be working #look for end of line and fix how much of 'Parameters:' we look for in pexpect dlen = 80-len('Device: /umcfiles/ftp_dir/ftp_peoplesoft/discount/AES_DISCOUNT_15010.TXT') pstr='Parameters:' if dlen > len(pstr): dlen=len(pstr) else: dlen=dlen-3 #remove the /r/n child.expect(pstr[0:dlen])
Sending IFS File to Outq Prints Line of "#" Symbols
I am attempting to send a file from IFS to an outq on our AS/400 system. Whenever I do, I get exactly what I send, as well as a line of "#" symbols of varying lengths appended to the end. Here's the command I'm using: qsh cmd('cat -c /path/test.txt | Rfile -wbQ -c "ovrprtf file(qprint) outq(*LIBL/ABCD) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)" qprint') The contents of test.txt is just Hello World! The output I get when I send the command is Hello World!#################################################################### I have not found any posts online about a similar problem, and have tried changing values and looking for additional switches to get it to work. Nothing I'm doing seems to fix the issue. Is there a command or switch that I am missing, or is something I have in there already causing this? EDIT: I found this documentation which is the first time I've seen this issue mentioned, but it's not very helpful: “Messages for a Take Action command might consist of a long string of "at" symbols (#) in a pop-up message. (The Reflex automation Take Action command, which is configured in situations, does not have this problem.) A resolution for this problem is under construction. This problem might be resolved by the time of the product release. If you see this problem, contact IBM Software Support.” The only differences are: 1) this is not a pop-up message, it's printed. 2) I don't believe we use Tivoli Monitoring, although I could be wrong. Assuming we do use Tivoli Monitoring, what would the solution be? There's no additional documentation past that, and I am not a system administrator, so I can't really make the call to IBM Software Support myself. And assuming we DON'T use it, what else could cause this issue?
I get different results, yet similar. I created a test.txt with Windows Explorer, put in Hello, world!, saved it and tried the script. I got gibberish for the 'Hello, world!' and then the line of # symbols. My system is 7.3 TR5, CCSID 37 (US English) and my IFS file is CCSID 1252 (Windows English). Results did not change if I used a stream file of CCSID 819 (US ASCII). I didn't have any luck modifying Rfile switches. I found that removing devtype(*userascii) produced printed output in plain English without the # symbols. Do you really need *USERASCII? I would think that would be more for a pre-formatted 'print-ready' file like Postscript or the like. EDIT: some more things to try I don't understand why *USERASCII is adding those # symbols; it looks like a translation issue. I tried this and still got the extra ###... You might have to play with the TOCCSID() parameter. Although a failure, it did give me an idea: what if those # symbols are EBCDIC spaces being sent as-is to the *USERASCII print stream? All we'd need is a way to send only the number of bytes in the stream file, without any padding. CRTPF FILE(QTEMP/PRTSTMF) RCDLEN(132) CPY OBJ('/path/test.txt') TOOBJ('/qsys.lib/qtemp.lib/prtstmf.file/prtstmf.mbr') replace(*yes) ovrprtf file(qprint) outq(*LIBL/prt3812) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no) cpyf prtstmf qprint The data in QTEMP/PRTSTMF is in ASCII; DSPPFM shows that much. It also shows a bunch of spaces: after all, it is a fixed length file. My next step was to write an RPG program to read the stream file and print it, but Scott Klement already did that: http://www.scottklement.com/PrtStmf.zip This works on my system: ovrprtf file(qsysprt) outq(*LIBL/abcd) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no) prtstmf stmf('/path/test.txt') outq(abcd)
Send raw printer codes after writing a FlowDocument, but before automatically cutting
The Good: I'm building a FlowDocument in my app and sending it to a Star Micronics TSP100 thermal receipt printer, and I can print bar codes as well by sending ESC codes to the printer directly. The Bad: It's automatically cutting the paper after the FlowDocument, before the bar codes have had a chance to print. The Question: Is there a better way to print the FlowDocument so it doesn't tell the printer it's done printing? Or to have the some part of that trigger an event handler so I can squeeze my bar code commands in before it tells the printer it's done? Here's where I am now: The flow document is called, creatively enough, "doc". FlowDocument doc Then of course, I add a whole bunch of stuff to the FlowDocument. Then I grab the printer and print the FlowDocument: string printerName = "Star TSP100 Cutter (TSP143)"; LocalPrintServer local = new LocalPrintServer(); PrintQueue rcptpq = local.GetPrintQueue(printerName); Xps.XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(rcptpq); IDocumentPaginatorSource dps = doc; If that all worked without errors (error handling not copied--this is what I'm stepping through), I write out the receipt: // print MOST of the receipt xpsdw.Write(dps.DocumentPaginator); The printer cuts here automatically. I don't want it to. I want it to cut after the bar code. // print the bar code RawPrinterHelper.SendStringToPrinter(printerName,"\x1b\x62\x2\x2\x30" + "MyUPC123\n"); // Cut the paper RawPrinterHelper.SendStringToPrinter(printerName,"\x1b\x64\x02"); (RawPrinterHelper is from the Star Micronics SDK sample, and what it does is pretty self explanatory, at least with my comments to describe the specific codes being used.) I've tried some settings in TSP100's Configuration tool regarding "Page end detection", but so far all I've succeeded in doing is turning off all cutting, or turning off the explicit "cut the paper" command at the end. I can't just turn off the first cut.
You should wait until the printer is done processing the FlowDocument print job before sending the raw escape codes. This could possibly be done by polling the PrintQueue.IsPrinting or by checking PrintQueue.QueueStatus.
VB6, ActiveReports, and Ricoh printers: Rotating the Page?
I have a BEAST of a program written in VB6. It uses ActiveReports to generate letters. The reports are processed in a loop; with verbage-building loops and (a whole lotta) nested 'if' and 'case' statements. Fugly! The reports are sent to the printer like such: Function PrintIt(ltrobj as Object) Set ltrobj = MyARdocument '(.Dsr file) ltrobj.txtfield1 = strVerbage 'This string was populated somewhere else ltrobj.Printer.DisplayProgressDialog = False ltrobj.PrintReport False End Function Now here's the weird part: The pages physically come out of the printer rotated 90 degrees each iteration of the loop. What's even weirder -- this only happens for my VB6 application -- other Word documents, reports, batch jobs, whatever come out normal. So the first page comes out like normal, the header first (pointing North). The second page comes out sideways (header pointing West). The third comes out of the printer like the first, the fourth comes out like the second, and on and on... The printer: A Ricoh Aficio MP5000 I cannot find a setting on the printer, or a property in ActiveReports that controls this. Any ideas, help, or a general direction would be greatly appreciated! Thanks, Jason
There is no "rotation" setting in ActiveReports. The closest things that might impact this would be the page size and orientation, but at worst I would expect them to flip back and forth not actually rotate the page. I would try to do a few things: Trace the printer & page settings related to orientation and page size as report prints. Try printing to another printer to see if it happens on all printers or just this one. Preview the reports on screen and see if they're rotated in the preview or not (or export them to PDF with report.Export(...) ad see if they're rotated there). To trace page settings you should do it in a couple places. One on the printer, and another on each page (or Canvas) in the report. There is also the ActiveReport.PrintWidth (the width of the report, not the pages) that may also be relevant. So just before printing each report try tracing out the following values: report.PrintWidth ' the default settings for the report report.PageSettings.TopMargin report.PageSettings.RightMargin report.PageSettings.BottomMargin report.PageSettings.LeftMargin ' actual printer's current settings: report.Printer.PaperSize report.Printer.PaperHeight report.Printer.PaperWidth report.Printer.Orientation ' settings for a specific page: for each page in report.Pages: report.Pages(...).Width report.Pages(...).Height report.Pages(...).Orientation BTW: ActiveReports COM Help is here. If the preview/PDF test seems okay then I'd focus on the printer itself. Same for the print to another printer obviously. Otherwise, focus on ActiveReports settings. Hope this helps Scott Willeke GrapeCity