Click to See Complete Forum and Search --> : Printing to next available printer


neddyflanders
December 26th, 2006, 02:07 PM
I need to figure out a way to write a program that will print a name label to the next available printer (their are 5 of them). So it three are already printing it will go to printer 4. Does anybody have any ideas or suggestions on accomplishing this? Or what the best programming language would be to use for this task?

PeejAvery
December 27th, 2006, 07:59 PM
Well, this would not be a client-side scripting task. This would have to be VB 6, .Net, or C++ because you would have to "hook" the printers to check the pending jobs. I will have a moderator move it to General Developer until a language is decided.

neddyflanders
January 3rd, 2007, 09:49 AM
Thanks, If anybody can offer even a suggestion on the best programming language to use for this it would be appreciated.

PeejAvery
January 3rd, 2007, 12:05 PM
The ease of the project will depend on the connection of the computer(s) to the printers. I assume this is over a network. Am I correct? Could you explain the connection?

neddyflanders
January 4th, 2007, 10:08 AM
Actually that will depend on me. I can set it up anyway I want to but I'm unfamiliar with dealing with printers especially in a situation like this but I do imagine it will be over a network. Basically a person logs into the computer, if their name is verified then a paper or label prints out of one of the available printers (whichever one is not being used at that moment). I have a lot of flexibility on this project.

PeejAvery
January 4th, 2007, 11:03 AM
If you start looking down the Visual Basic path, this (http://support.microsoft.com/kb/154078) page will be of good use to you. Also, you could get help with the APIs mentioned there at API.net (http://www.allapi.net/apilist/). Using OpenPrinter (http://www.allapi.net/apilist/OpenPrinter.shtml) would allow you to get the status of the printer. If busy, you could test the next printer.

Vanaj
January 4th, 2007, 12:53 PM
I need to figure out a way to write a program that will print a name label to the next available printer (their are 5 of them). So it three are already printing it will go to printer 4. Does anybody have any ideas or suggestions on accomplishing this? Or what the best programming language would be to use for this task?

1. The program should have an array of designated printer names.
2. When printing is needed, enum through the names and get printer status, if busy, go to next printer name and check status, if all full pick the one with the smallest number of jobs in the que and print.

This can be done easily in VC++ MFC...

neddyflanders
January 4th, 2007, 01:55 PM
Which do you think would be the best programming language to use. I see Vanaj wrote Visual C++ MFC. Only problem with that is I'm completely unfamiliar with Visual C++. If thats considered the best I'll check into it. Let me know what both of you think.

Vanaj
January 4th, 2007, 01:58 PM
Which do you think would be the best programming language to use. I see Vanaj wrote Visual C++ MFC. Only problem with that is I'm completely unfamiliar with Visual C++. If thats considered the best I'll check into it. Let me know what both of you think.

What language are you currently using ?

PeejAvery
January 4th, 2007, 02:08 PM
As well as can be easily done in VB with the APIs that I have already listed. Arrays are standard. Any language can use arrays. And yes, that is a very smart way of doing it.

neddyflanders
January 5th, 2007, 01:10 PM
I'm currently learning C# but I am very familiar with Visual Basic so thats probably the route I'll go. Thanks alot for all your suggestions.

PeejAvery
January 5th, 2007, 03:02 PM
You're welcome. Good luck with the printing. :thumb:

PeejAvery
January 15th, 2007, 01:25 PM
Too bad you aren't using Macs to do this. Network printer pooling is built right in.