Solved

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

Posted on 2003-10-28
6
840 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

776 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