Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,086 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,559 people online right now. Registration is fast and FREE... Join Now!




How to print C++ graphical output on printer?

 
Reply to this topicStart new topic

How to print C++ graphical output on printer?

rahuls
13 Apr, 2008 - 03:37 AM
Post #1

New D.I.C Head
*

Joined: 13 Apr, 2008
Posts: 1

Hi,

How to send a graphical output to printer in C++?
Please reply soonly.

Thanks,
Rahul.
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: How To Print C++ Graphical Output On Printer?
13 Apr, 2008 - 05:56 AM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
I hope that this is soonly enough.

There are a number of ways to do this. Back in the day when I was last programming for printers you would look at the printer manual and get all the escape characters that were needed and then write a routine that broke your image down in to N by M graphic blocks and sent that data to the printer as a long set of escape sequances. This method still works but is rather outdated.

Nowadays printers tend to use something like postscript as a go between. Rather than having to know all the hardware details for the printer, you just need to know the postscript and send that to the print driver and it should be able to process the image and print it out. If you are printing something like a graph then I highly suggest learning about postscript as you can have much much more control over how your data gets printed.

What platform are you on (since this will be done in different ways on different systems)?
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 08:13PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month