Solved

How to print a PCL file to an HP Printer using C++

Posted on 1998-07-24
4
1,050 Views
Last Modified: 2008-02-01
I have to modify a Visual C++ application that currently prints DjDe files to print both DjDe files and PCL. The Files are printed to a HP Printer that has PCL 5.0. I can't find any documentation or sample code. I'll like to know..."How to I print a PCL file to an HP LaserPrinter that has PCL 5.0??"
0
Comment
Question by:cc012ch
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
trestan earned 100 total points
ID: 1168561
PS is a programming language, while PCL is more like format descripting. PCL 5 Quick Reference Guide can be bought from HP. You can search its site to try more luck:
http://www.hp.com/cposupport/printers/support_doc/bpl01354.html
http://www.hp.com/cposupport/printers/support_doc/bpd02925.html
There are two books:

Developer's Guide to Hp Printers - Norman E. Smith; Paperback

Hp Laserjet Handbook (Popular Applications) - Louis Columbus; Paperback
In visual C++, the device initialization and environment of a printer can be set in the structure DEVMODE, PRINTDLG. The DeviceCapabilities function retrieves the capabilities of a printer device driver. Pls refer to online help for detailed information.
0
 

Author Comment

by:cc012ch
ID: 1168562
Trestan,
The files that I will be printing are already in PCL format and are downloaded to a PC from a Tandem server. Some of the files are PS files (the program already handles does files) and some of the files will be PCL files. As soon as the file is downloaded  it needs to be printed by the program. The user doesn't have a choice. The program does not use the PRINTDLG. It has to setup everything on its own. Do I have to only setup the DEVMODE structure? What fields do I need to setup? Do any of the fields that I change will effect PS files? Once it is setup how do I open and write to the printer? Do I create a CDC for the printer?
I hope you don't mine this very basic print questions. Thank you so very much for your GREAT help.
cc012ch
0
 
LVL 8

Expert Comment

by:trestan
ID: 1168563
Since your files are already PCL type, and your printer is a PCL printer, I think it can be printed out when you send them to printer. Please take a look at MS and Adobe site, they do provide detailed illustration:
http://support.microsoft.com/support/kb/articles/q158/0/81.asp
http://www.adobe.com/supportservice/custsupport/SOLUTIONS/11fc2.htm
0
 

Author Comment

by:cc012ch
ID: 1168564
Thank you so much for your help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ mixing int and strings in multi array 8 71
Issue accessing member variable of atomic class 16 110
convert char array to number in c 5 83
Dialogbox API leak? 18 82
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

861 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

20 Experts available now in Live!

Get 1:1 Help Now