?
Solved

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

Posted on 1998-07-24
4
Medium Priority
?
1,081 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
trestan earned 400 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

752 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