?
Solved

Script to print a large file from command line

Posted on 2003-11-04
12
Medium Priority
?
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn different types of Android Layout and some basics of an Android App.
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 …
Starting up a Project

801 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