Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

860 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