Zebra labels missing and out of order - printing

We are trying to print a batch of labels onto a Zebra printer. However, there are two problems:
- Sometimes some labels are missing
- Sometimes some labels appear in the wrong order
The Zebra printer is setup as a Text/Generic printer in Windows. We copy temp-files with ZPL to the printer. Each label is individually copied to the printer (using .NET File.CopyTo(...). Sometimes the number of labels/files sent to the printer is > 1000.
Due to logging we are pretty sure all the labels are copied to the printer queue correctly and also that they are copied in the correct order.
Any suggestions?

If you are connecting to the printer on the network the printer can only allow a limited number of connections. So if you send many labels at once the printer will accept some of the connections, but refuse the others. The OS will then attempt to reconnect but that will not be in order.
You have two choices: open a connection to the printer and send all the jobs to that connection or merge the print jobs into a single file and send that.

Related

Networked program has problem "waking up" HP printer to print

I am writing some software that tries to print via IPP to typical HP laser printers like the M605, for example, and it is having a hard time "waking up" the printer sometimes. What happens is that the software tries to connect to the printer's IP address on the local network (10.1.10.185 or whatever) and gets a "No route to host" error. If the user tries several times in a row, eventually the printer "wakes up" and begins responding.
I notice that regular Linux or Window programs that print to the printer do not seem to have this problem. So, either they are not using IP/networked printing or they have some way to deal with the "sleeping" problem that I am not aware of. I suppose I could put a tap on the ethernet cord, and print from a Windows program and see what it is doing, but that would be a very time consuming and laborious procedure.
Does anybody know what I am doing wrong here? Is there some way to wake up a printer via its internet connectivity access protocol?
One thing I noticed in one person's code is that they had a 30-second timeout specified on the connect, so that may be the issue, is that my connection timeout is just not what it should be. In that case, is there an established timeout period for waking up HP printers?

Printing on Epson receipt printers from Windows 10 command line

I expect it to be possible to simply compose a notepad textfile with text and control chararcters (ESC/POS) and copy that file to an Epson Thermal Receipt printer. Amongst a lot of information that I found on internet, I could not find a sample text file that simply shows how to do such.
I was able to link the USB printer to lpt1 and when I use something like copy /b c:\test.txt lpt1, I get some output. I reached the printer but it doesn't understand the language so to speak.
I did find Epson documentation with the esc codes. It would be of great help if I had a sample text-file and some directions on how to place the control characters in that file.
The Epson information is not a course, it is a manual. That is why I get stuck I guess.
You can see the ESC/POS specifications based on this page.
TOP»POS › TECH.REFERENCE»ESC/POS COMMAND FOR TM PRINTER»Introduction
There is no document compiled in PDF etc., but perhaps it may be available by registering for EPSON's partner program. At least you can ask if it exists.
Epson Advantage Partner Program
LPT devices may also be used for questions like questions, but a more suitable one would be serial port device mode.
If you change the interface setting of the printer hardware from the printer class to the vendor class and install the serial port device driver, you will be able to communicate via the serial port.
Please refer to the user's manual etc.
However, in any case, if there is no paper, the cover is open, or some error has occurred, printing will not be possible.
And you can't know the status just by sending unilaterally on the command line.
In order to deal with such a situation properly, it will be necessary to create a program that communicates with the printer and requests printing, and in that program, monitor the status of the printer and deal with errors.

How to allow CUPs to wake up printer once when in standby?

I an bringing up my home print server using RaspberryPi+CUPs
MY printer is HP Laserjet MTF m1212nf.
Apprently, I I was able to setup everything good enough to be able sending jobs over the network and get them printed.
However, one problem i am running into is that once I leave the printer Idle for some time, it seems to go into kinda standby mode (kinda power-saving mode) and then jobs i send show as completed in the CUPs interface, but they never get to be printed on paper.
From this point, the way to resume printing is to shut off and then on the printer and then things work again until next go into power saving mode.
What you look for is Tea4Cups, which is a bridge beetween commands and cups.
For installation on RPi see here: (step 1-3) https://github.com/Felixel42/Printer-Pi-DCP-115C#tea4cups
Prefix your printer line i.e. smb://yourprinter so that it looks like that
tea4cups:/smb://yourprinter
The configuration file is at /etc/cups/tea4cups.conf
A minimal example is
[global]
directory : /var/spool/cups/ #you might need to adjust this
prehook_0 : wakeonlan yourmac #or whatever command you want to execute

Simulate Printer Errors / Printed Pages Signals

I'm testing software that sends jobs to the printer queue and then rises a flag when they are successfully printed. It also needs to detect how many pages printed correctly in a failed job.
Although there are many "Virtual Printers" out there, they all process their jobs perfectly... And that's the problem.
Is there a printer simulator that can provide with control over the signals it sends back to the windows spooler, such as printed pages, out of paper errors, paper jams, etc?
I'm not interested in the raw output the printer driver handles to the printer, but rather the signals the driver passes back to the windows' spooler.

convert printer port bytes inpout32

I'm running out of ideas.
I'm using C by the way via inpout32.dll.
I have these "bytes"(e.g. 0000,00CC) being read from the printer data ports D0-7 or D1-8.
I need to filter out human readable characters when a print job is being done.
This is still very primitive, but I've got a listener function catching these data using inp32.
Basically if I do a print in notepad like 'Hello World', this will be pulled out from the byte being read by inp32 function.
the printer port listener is on a separate app.
the idea is that the app can listen in on any printer.
It's basically a PoC at the moment.
but what I'm using right now to test is a Canon BJC-1000SP, it's pretty old but it's the only parallel port printer we've got at the office. the others are USB types.
I'm using this on Windows at the moment.
Thermal Printers are actually the ones we'll be listening on.
So now I'm trying to use a generic driver that allows raw text file to print.
How can I extract text from it via the port?
If anybody can give me an idea, a function/converter or where to search, that would be great.
If all you read is already human-readable text, just store it all.
If not, you need to think about the character encoding in use. If it's plain old ASCII, you can probably just call isprint() to determine if a byte is a printable character.
The above of course assumes that your printer is talking plain-text, which probably means it has to be a rather old and simplistic printer (like a dot-matrix from ~20 years ago, or so).
If it's a modern "Win-Printer" laser or inkjet, with all the intelligence of page layout being done by the host computer in the driver, you're probably out of luck. In these cases, what is transmitted is the instructions to layout the page, typically in a printer-specific format.
I think you should edit your question and specify exactly what printer you're using, and in which operating system environment you're running your program.
Update: The Canon BJC-1000 printer you're currently using is an inkjet. It very probably relies on the host computer to send it line-by-line (as in ink lines, not text lines) of data to control the various ink nozzles. I don't think it ever sends plain text to the printer. You could investigate by reading through the code of an open source driver. For Linux, the recommended driver is called gutenprint.

Resources