Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
867 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
[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
  • 2
6 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

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!

Question has a verified solution.

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

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.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Introduction to Processes
Starting up a Project

722 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