Solved

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

Posted on 1998-07-24
4
1,044 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

757 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