My program need to print a curve, my solution is changing the curve into a picture, and this picture file (xxx.png) can be printed by using the default windows picture printing tool(right click the mouse on top of the file, and select print).
but I don't want user do this job manually, I need a command line tool to do this:
printPicture xxx.png
is there a tool like this?
ps: free/open source
edit: right click the file, and select "print", then I can print this file, How can I do it in command line ?
You can call ShellExecute from your program with
print
operation:This link had a simpler solution:
mspaint /pt [image filename]
I had a similar problem but I also needed way to control scaling (needed for barcode work) and always have the image centered.
I wrote an Open Source tool called ImagePrint to do just what you want. It's written in VB.Net as a console app. At the moment, it only prints to the default printer.
I finally found out!
use windows image and fax viewer.
This prints an image file (.png in my case) to a specified printer WITHOUT a dialog box popping up. Also... works without elevated command prompt privileges.