Solved

Script to print a large file from command line

Posted on 2003-11-04
12
207 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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
 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

786 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