Solved

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

Posted on 2003-10-28
6
844 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
6 Comments
 
LVL 22

Accepted Solution

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

Assisted Solution

by:monkesdb
monkesdb earned 62 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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 …

828 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