Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command line tool for print picture?

My program needs 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

How can I do this in command line?

like image 723
linjunhalida Avatar asked Feb 20 '10 04:02

linjunhalida


People also ask

How do I print from command line?

To print a document on the default printer, just use the lp command followed by the name of the file you want to print.

What is print comand?

The print command is used to print a file directly without using a Windows application that supports printing. Specifies the name of the Windows server on which the z/OS printer was defined as a Windows shared printer. The Windows server can be your own Windows system or a different Windows system.

How do I open a JPEG in terminal?

To open a picture from terminal, To open any file via terminal, you have to locate the path of that file. Then type the name of the application which you want to open the file with. Save this answer.


2 Answers

I finally found out!

use windows image and fax viewer.

rundll32    shimgvw.dll    ImageView_PrintTo /pt   xxx.png   "printer name"
like image 139
linjunhalida Avatar answered Sep 27 '22 16:09

linjunhalida


This link had a simpler solution:

mspaint /pt [image filename]
like image 21
ulatekh Avatar answered Sep 27 '22 16:09

ulatekh