Solved

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

Posted on 2003-10-28
6
834 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
Comment Utility
0
 
LVL 3

Assisted Solution

by:monkesdb
monkesdb earned 62 total points
Comment Utility
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
Comment Utility
Did you get what you need?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now