Solved

Script to print a large file from command line

Posted on 2003-11-04
12
204 Views
Last Modified: 2013-11-13
We are using windows 2000 client as print server and a zebra barcode printer. This printer will print only when there is object infront of it other wise it will not. We have
a large file (to print lables on 5000 cartons) and this total printing time is supposed to be 12 Hrs. We wnat when the job is given to be printed we should not get any error in case printer is busy or printer memory is full. We should get errors only if printer is not functioning.
0
Comment
Question by:memberksa
  • 5
  • 4
12 Comments
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9685148
memberksa: We did something very similar but it was for another printer. this is how we went about it. Our printer had an RS232 connection and we could connect to the printer via the MSCOMM control we used to send to the printer data via the port after checking the status of the printer. you can try the same if your printer allows you.
if your printer has a windows driver then you can check the status of the printer driver by using the Printing and Print Spooler Functions you can search in msdn for "Printing and Print Spooler Functions"

this link also provides u some information
http://www.merrioncomputing.com/Programming/PrintStatus.htm
0
 

Author Comment

by:memberksa
ID: 9685269
The printer is connected through 10Mbs TCP/IP (card is supplied by Zebra). Using serial port may not be practically viable b'caz
1) the distance between the printer and system is 100 Meters + (on production line and due environmental resons we cannot have  a computer on production line).
2) Secondly if we are going to sense the status of the printer by polling then in thime interval polling is made and system responds with commods to printer for printing there may be cartoons on production line which will go without a lable and this will be a disaster.
Presently we are able to sent 1200 labels at one go but we want to increase it to 5000.
0
 

Author Comment

by:memberksa
ID: 9685293
In addition to the above comments if it can be gaurenteed that
if i split the printing job into more than one job and submit it for printing then the printer queue should submit them to printer as and when the printer is ready to accept new jobs and at same time should not result in any error messages.
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9685313
does the printer have a windows printer driver? if yes then you can check if the printer memory is full or not if its not send data to printer of its full check again after 1 second or so. I suppose 1 seconds is not a large time. and the printer should responds in one second. so max 1+1=2 seconds to wait before sending data to the printer when the printer's memory is not full
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 9

Expert Comment

by:bhagyesht
ID: 9685335
when the printer's memory is not full : still means that the the printer is having work to do and is not idle since if it has a 2mb memory and the memory is 1.8mb with data you shall get memory not full so u can send jobs
0
 

Author Comment

by:memberksa
ID: 9685542
1) We are using generic text driver and sending commands to printer in printer language (ZPL)
2) The memory free which is given by the utilities may not be exact memory free as processing of labels takes more memory than the storage of formats. Memory free give memory free after storage of formats and not after processing of formats.
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9685590
I am not sure processing of labels takes memory. anyway this is as far as I can go. how about just keeping on sending data to the printer if the memory is full an error occurs check if the error is due to full memory if so ignore it?
0
 

Author Comment

by:memberksa
ID: 9709477
The suggestion does not work
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 350 total points
ID: 9712165
I dont think what you want to achive will be directly possible without having the driver/api of the printer.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now