We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to print captured image, which i grab using get().
As i press button on screen, program capture predefined image, save it & print it.
to save image , i am using save image function & working perfect, but same item how can i send directly print command to default printer.
Need help.
Answers
operating system?
the answer will differ wildly depending on whether you're using windows or a mac or linux.
I will use windows7 or 8
I cannot test on windows at the moment, but i think i've done this kind of things with something similiar to this:
edit: There was an error in the code, thanks to @GoToLoop for pointing it out.
Thanks Dear Benja, going to test it.
@benja, don't access sketchPath, width & height before setup().
It won't work b/c they're not initialized yet! :|
every thing run except print.
sketch saves png file in sketch dir.
I have set dir address in Working Dir.
following error generate.
java.io.IOException: Cannot run program "mspaint" (in directory "sketch_151202a"): CreateProcess error=267, The directory name is invalid
My working folder is
D:\Myprocess\sketch_151202a
Of course @GoToLoop is right, I will change the code above.
When i move the line with the working-directory to the mousePressed()-function it works for me on Windows7.
Do you have mspaint installed? You could check by writing "mspaint" in commandline.
Yes, it is installed.
Now working fine.