[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to get printer's state and control printer in Java or VC++6.0

Posted on 2003-10-28
6
Medium Priority
?
898 Views
Last Modified: 2010-04-17
I want to get printer's state and after that i can control printer, so what can i do to programming in Java or VC++ to accomplish that task. If anyone can give me example sourcecode in Java or VC++ to do it. Thanks alot.
0
Comment
Question by:nhthanh
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 252 total points
ID: 9638294
0
 
LVL 3

Assisted Solution

by:monkesdb
monkesdb earned 248 total points
ID: 9638665
I've not tried this but it should be along the lines of...


#include <fstream>

...

fstream printer("LPT1");

printer << "hello world\n\nThis is a test.";
printer << "\f";  // you might want to put a formfeed at the end.

printer.close();


0
 
LVL 22

Expert Comment

by:cookre
ID: 9889070
Did you get what you need?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 …
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Introduction to Processes

834 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