Hey all, anyone knows how can I print a picture in c++;
CAN U GIVE ME A CODE? A SAMPLE?
THANKS
Hey all, anyone knows how can I print a picture in c++;
CAN U GIVE ME A CODE? A SAMPLE?
THANKS
Print?
Do you mean, using printer?
edited
yes using printer..
print a picture using printer, c++ code
Ubuntu, gcc compiler..
can I get a sample code that does this!
Tell us, which Operating System and C++ compiler you are using?
It will help others to suggest you an easy solution.
I already googled, didnt find anything.
can i just like windows , call system(print watever..)
how it works in linux?
FILE * fpPrint; // file handle for printing
fpPrint = fopen( "PRN:" ); // open the printer port
fprintf( fpPrint, "testing" ); // write to the printer
fclose( fpPrint ); // close the printer port
this code aint enough
I Want To Print A Picture
Printing pictures is absolutely not trivial. In a Linux/Unix world, you'd probably be best off trying to form the image as a PostScript document first, then use the standard printing processing. Of course, that's probably a few hundred lines of code at the very least, quite likely more into the early thousands.
The simplest way to print something in Linux would be to load it into an existing application and use it's print function - it allready has the code to do that.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
No, he's not - nor is anyone else - going to write it for you. He just said it's a very complicated process. What makes you think people have time to dedicate to spoon feeding you a program?
At the very least you have to a) find a library that provides this functionality, and b) link with that library and use it in your program. And no, I'm not going to post an example.
Last edited by medievalelks; 05-28-2008 at 06:16 AM.