Page 1 of 1
Printing an image
Posted: Wed Feb 01, 2017 12:35 pm
by MaxV
If I had to print an image, what would be the best procedure?
I don't need to modify it, just send the JPG file to the printer.
on Linux is very easy, just use:
but on Windows or Mac?
Re: Printing an image
Posted: Thu Feb 02, 2017 10:45 am
by AxWald
Hi,
on Windows, try:
Code: Select all
put shell("mspaint /p c:/folder/subfolder/filename")
Have fun!
Re: Printing an image
Posted: Thu Feb 02, 2017 12:24 pm
by AndyP
I was surprised to find that on Windows that you cannot print images from files directly from LiveCode.
So here is my solution to this which involves printing a card of a stack scaled to an image.
I've put a blog post and download of files here.
http://2108.co.uk/printing-file-images- ... -solution/
Re: Printing an image
Posted: Thu Feb 02, 2017 4:06 pm
by AxWald
Hi,
never tried printing images from LC ;-)
I'd usually have tried to display it on a card, then print the card - but in this case, I felt a substitute to the given Linux cmd was asked for, and using paint instead of lpr should do the job ...
Have fun!
Re: Printing an image
Posted: Thu Feb 02, 2017 5:00 pm
by [-hh]
Max, on MacOS (here 10.12.3)
works also, uses CUPS. Good
help file (more than from 'man lpr').
Re: Printing an image
Posted: Mon Feb 06, 2017 12:10 pm
by MaxV
Hi all,
thank you for your replies, I found on internet this command:
Code: Select all
rundll32 C:\WINDOWS\system32\shimgvw.dll,ImageView_PrintTo "c:\mydir\my.bmp" "Fictional HP Printer"
Do you think that is better than passing trough the MSPaint software? Or is it the same?
Re: Printing an image
Posted: Mon Feb 06, 2017 2:12 pm
by MaxV
AxWald wrote:Hi,
on Windows, try:
Code: Select all
put shell("mspaint /p c:/folder/subfolder/filename")
Have fun!
Hi AxWald,
thank you for your code, you can choose also the printer with:
Code: Select all
put shell("mspaint /pt c:/folder/subfolder/filename printerName " )