Zebra-printer LP 2824 not printing - zebra-printers

I have Zebra LP2824 printer. It is working properly on Windows XP, but It is not working properly on Windows 7. On windows 7 it prints the Test page on printer properties, but it is not printing in my application. It seems, that it can't find the port, the printer is using. On the same application, but on Windows XP it is printing. I am connecting the printer with USB.
Does anyone knows what seems to be the problem?
Thanks for help in advance. :)

I usually have to share the printer in order to get it to accept a print job. Sharing in Win 7 is a little different I think - there might more than one step. Open the printer queue and pause it, then send a print job to it - see if it shows up (then un-pause) If it doesn't show up in the queue, there might be a share/permissions problem.

I just managed it today to print on another zebra USB printer.
use this article : http://support.microsoft.com/kb/322091/nl
Notice dough that the sample has a small error, so go to this function
public static bool SendFileToPrinter( string szPrinterName, string szFileName )
...
..
overthere go to then end of that function and add the line i mention below
Marshal.FreeCoTaskMem(pBytes);
fs.close(); // <-- add that or it will crash with locked files errors.
return true;
How Zebra printers behave depends a lot on what you try to print, and how the program works
For example notepad and edlin and wordpad and dos PRINT can all work different.
Some programs print RAW directly (as the url code does), others pay some respect to the printer preferences > still dough a TXT file raw printed containing ZPL commands will overrule printer settings..
ZPL is a little nightmare in itself
If you need paper to be cut
You will need
^MMC
you wont find it explained like that in their manuals.
(because they sell their own label printing design software i think..)

Related

Print file to printer or default printer through command prompt in windows 10

I have a file located at C:\printme.txt
I want to print it to my printer which is named POS80
Is there not a simple command for windows in the command prompt to say Print C:\printme.txt to POS80?
It should be noted that POS80 is also the default printer so a command that does not include the printer name but just sends to the default printer would be acceptable too.
Your mileage can vary using the legacy command Print
It MAY work if you have a line printer set to LPT1 and worth trying
Print C:\printme.txt "POS80" However I expect you are getting the error message "Unable to initialize device PRN" that is not unusual as PRN was traditionally LPT1.
Later you say its USB connected. which means its serial (old Com ports) whereas Line Printer (old LPT ports) were parallel hence the potential needs for fettling, but in windows you can use the port name for the printer and that resolves ports issue (files can become ports or vice versa) thus no real problem.
Now you could try messing with printer port redirections to get around that but it would likely mess up other application printing. Thus by far the simplest is make the printer the default one which is what you have.
To avoid the Save Output File As dialog when adding a print job to the default queue, ensure that your default printer isn't Microsoft XPS Document Writer, Microsoft Print to PDF, or other print-to-file options.
So what is Windows 10 doing when you right click print? Generally it fires up the associated FTA (File Type Application) which for .txt (or similar chosen) is NotePad.
Thus the simplest way to command line print plain text is
NotePad /pt C:\printme.txt "POS80"
NotePad settings can be changed in the registry before and after you print, via the command line, even skewing letters (fun to prank colleagues if you use 1 degree off kilter), however you cannot set line spacing or add graphics, for those you need to step up to WordPad which will accept docx, rtf, odt and most simple text file types.
Several other file types can also be printed in a similar way such as graphics images, using mspaint.
Later you say you are sending html as text and want graphic output not textual.
So the x problem is the files are not plain.txt they are plain.htm so need translation from html by graphic conversion (rendering) to pass through a printer language converter (printer driver) That's a totally different question but the answer is still much the same.
Traditionally you would simply use
rundll32.exe mshtml.dll,PrintHTML "C:\printme.txt"
But security exploits have made that simplicity more of a challenge thus
best to run it like this.
cd /D C:\Windows\System32 & rundll32.exe mshtml.dll,PrintHTML "C:\printme.txt"
And Microsoft Current Policy is "User confirmation is needed to print an HTML page through MSHTML.DLL." thus you need to hit print using sendkeys.
If your preference is FireFox rendering, from the command line you needed to install an extension, however with tightened security in windows 10, I dont know if that's still possible.
If you wish to print xml or html graphically in windows 10+ you can ask Edge --headless to print those for you to PDF, either as screen shot or rendered text, silently without enforced html confirmation ! And again you can print html automatically by using sendkeys to replace the user.
However printing PDF from the command line is where the real fun begins.
It is possible if the PDF is the correct type prepared for the printer (even a simple thermal or inkjet) then an old school copy /b file.pdf "printer" may work but dont send a big file to test, just a tiny Hello World!, or your carbon neutrality is instantly wiped out by reams of paper with one or two letters each.
My dirt cheap HP accepts files that can be viewed as PDF that start textually like this i.e. which have the PCLm 1 comment.
%PDF-1.7
%PCLm 1.0%
223 0 obj
<<
/Type /Page
/Parent 2 0 R
/Resources <<
/XObject <<
/Image0 3 0 R
/Image1 4 0 R
For most POS printers a PDF either needs to be processed in middleware or usually top end firmware such as onboard Direct PDF
Thus we come back to using html bitmap and text directives that will either need a print driver or be programmed to a port or file for later copy /b to device.
As you no doubt know Microsoft have not made it simple to print file.html default in fact the opposite resulting in many third part apps for win xp-win 11 such as https://www.bersoft.com/htmlprint/index.htm#overview amongst many other options.

QZ tray prints RAW print instead of Actual Barcode

I am a trying to print Shipping labels from a website to my TSC DA310 thermal printer. I have installed QZ tray locally, but my printer is printer Raw commands instead of the shipping label along with the barcode etc. Anyone else faced a similar issue?
Quoting the DA310 user's manual, this printer has a special "TSPL-EZD" firmware which emulates
"out of the box" the following label formats:
Eltron® EPL command emulation
Zebra® ZPL command emulation
Datamax® DPL command emulation
To quote the original symptom:
my printer is printer Raw commands instead of the shipping label along with the barcode etc.
Since all shipping providers provide commands in one of the above formats, this suggests that the vendor-provided driver may be interfering with the printing.
One way to bypass the driver is to change it from TSC DA310 to Generic / Text Only using Printer Properties, Advanced, New Driver.
Since this printer driver is provided by a 3rd party (at time of writing, a company called "Seagull Scientific") you may consider reaching out to Seagull Scientific with this particular problem. At time of writing this, te default driver does not seem to offer any configurable options regarding specifically to language emulation.
If all else fails, reach out to TSC technical support to see how to send raw label commands to their hardware.
TSC technical support will want to know which label format you are sending. To find out, see the following reference:
ZPL usually looks like this: ^XA ^FO ...
EPL usually looks like this: N q812 Q1218 B5 ... A310 ..
DPL usually looks like this: <STX>L D11
Lastly, for help using the TSC-series printers with QZ Tray (per qz-tray tag), you may reach out directly to support or ask a new question and link it here in the comments.

Inconsistent printing with CUPS on Raspberry Pi

I am printing an image with a thermal printer off of a raspberry pi. This works fine most of the time but I have an issue where the job never completes.
The command is just a simple: lp <filename> and I have the thermal printer as my default. This works but occasionally, it won't print in that terminal. Then just opening a new terminal and sending the same exact command works. I've had to just have a handful of terminals open and jump between them until one of them prints it.
Does anyone have any insight to why this would be happening and what a possible solution might be?
I am running this from:
Raspbian Stretch
CUPS v2.2.1
Zebra ZD410
Here is the end of the output of an unsuccessful job (Job 118) and successful job (Job 119) from /var/logs/cups/error_log
I ran into a very similar issue to the one you are describing with Zebra ZD410 printers and cups printing from RaspberryPi.
By default, between each print job cups will reattach the usb printer. The ZD410 printer does not like when cups does that and the next print job will appear to go to the printer, but it won't print and there will be nothing in the logs that show any errors. This happens intermittently but frequently enough to make the printer unusable.
I was able to fix this problem by deleting the ZD410 printer from cups and adding it back using lpadmin and putting this configuration flag at the end of the lpadmin -p command:
-o usb-no-reattach-default=true
Try my suggestion and please let me know if it resolves your issue. Hopefully, this will help others with this problem as well.
You do not even name the exact Linux distro you are running, and which version of CUPS this involves.
No idea what your problem is...
But here is an idea how to start narrowing it down:
Enable LogLevel debug in /etc/cups/cupsd.conf and re-start the CUPS daemon.
Now you can follow whatever CUPS does with your print jobs:
less /var/log/cups/error_log
This may give you a hint. Note, that all lines in the log starting with E denote an message with log level 'error'. (I denotes log level 'info', W is 'warning' and N is 'notice'.)
There's one more thing you could do:
Determine, if it happens that exactly the same job file prints sometimes or doesn't print at other times. If so, it seems a "random" failure of the print device, or the transfer path from CUPS to the printer where some bit flip introduces an error. If not (the same file never prints), then this gives you another hint to narrow down the real problem.

Yes/No Dialog on every page the printer will print

I'm doing this in a printer server. I am trying to make a program that will show up a Yes/No dialog box before proceeding to print a page printed by any application or from the network.
So far, it was easy to pause and resume a job. But haven't found a solution to pause and resume a page to be printed.
For reference, here's more about controlling the printer on Windows
https://msdn.microsoft.com/en-us/library/windows/desktop/ff686805(v=vs.85).aspx
I am using Windows 10 64bit. Any language will do.
Thanks.
I'm prepared to be proven wrong, but I don't believe this is trivially possible. The print spooler doesn't have a notion of where pages begin and end in a spooled print session.
The location of each page is language dependent, and the print spooler can hardly be expected to parse the stream to find the start and end of each page, it would be very slow for one thing.
The alternative would be for the print processor to note the beginning and end of each page and the offset of the spool file at that moment, and then pass that information separately to the spooler.
But there are problems with that too. the 'RAW print' capability allows the printing application to inject 'stuff' straight into the print stream, bypassing the print processor altogether. This is common with page layout applications when printing to a PostScript printer for example, particularly on Windows as supporting CMYK isn't really possible when printing on Windows, and spot colours are even harder.
The injected code can contain any number of pages and the print spooler has no way to know where each page is.
So in the general case, I don't think this is possible, at least not in the print spooler.

Slow printing in vfp using dot matrix printer (LQ-1170)

I know that this is an old topic for vfp programmers. Still, I want to ask for advices that can improve the printing time for my particular case.
I recently asked to change a report written in vfp. It use commands such as fputs, etc. The user prints this report in a dot matrix printer and of course : no problem. But the user asked for column addition and some complex calculation in the report. We tried to avoid paper size changes. So my initial solution was to rework the report using report designer, and set the page orientation to landscape. The result is so slow when printed.When I open the print queue, it even shows error - printing status!
I've tried to instal the printer driver in my local PC ( the machine where I compiled the exe) and selected this printer, both with 'save printer environment' checked and unchecked. Still the same result.
Any suggestions? Other tricks for my case are welcomed. Thanks in advance.
Sometimes, and not sure if its your case, when creating a report in VFP, it saves the printer environment based on the computer used to develop it (ie: your machine). To check, and since all reports are nothing but .DBF tables renamed, try the following. Open the report as a table
USE YourReport.frx (you have to explicitly include the .frx extension)
BROWSE
The first line in the report is your environment information that includes paper size info, orientation and even printer information. Double click in the column "Expr". The only things you probably need in this column are
ORIENTATION=1 (or 0)
it may have other stuff and look something like
DRIVER=winspool
DEVICE=\some\printershare
OUTPUT=IP_192.168.1.22
ORIENTATION=1
PAPERSIZE=1
SCALE=100
ASCII=0
COPIES=1
DEFAULTSOURCE=15
PRINTQUALITY=600
COLOR=2
DUPLEX=2
YRESOLUTION=600
TTOPTION=3
COLLATE=0
You can remove the rest of it. Next, close this column and tab over about 10 more columns to "Tag" and "Tag2". They are also MEMO type fields. Open them up. Remove ALL data out of these two columns... BUT ONLY FOR THE FIRST ROW!!!! If you open them, you would see more embedded stuff about the printer, just remove it completely. Do NOT do a global replace to blank for all rows as that will kill the report content... ONLY the first row.
All this being said, I can't guarantee, but it may be the culprit... but then again, doing direct output on old dot-matrix printers might actually be faster than all the fancy rendering the printer drivers are doing.
Trying to print a report from the report designer through the windows driver to a dotmatrix printer will never be acceptably quick.
That's why they originally did the report using commands.
Your choices are either change the printer to a laser printer (probably not possible I'm guessing) or change the report back to the old style.
It's hardly difficult to print fast on a dot matrix printer with VFP reports, you should do it on a raw mode, but not on ?? or ??? way, I mean on API calls like this:
--- RawPrint VCX ---
http://www.universalthread.com/ViewPageNewDownload.aspx?ID=9556
You can use a wrapper, with kind-of "Formats" support it's a commercial software but it's worthy if you need to do a lot of reports with this kind of printer:
--- DosPrint 4 ---
http://www.victorespina.com.ve/hs/es/index.php/DOSPrint4_%28VFP%29
(disclaimer: the developer of DosPrint 4 it's a friend of mine, and I worked with him testing and supporting on the previous version DosPrint 3 on the spanish MS-VFP newsgroups and http://Portalfox.com)
Try using the Microsoft Generic Text only print driver

Resources