Page 1 of 1

Send a downloaded image to Printer using Pi

Posted: Tue Sep 30, 2014 4:05 pm
by eysi
Hello Guys!

I'm new to the Pi and I'm still on the learning curve of learning python, Is it possible to send an image downloaded using.urlretrieve of Python and then send it to the printer to print it!


Thanks in advance! :D

Re: Send a downloaded image to Printer using Pi

Posted: Tue Sep 30, 2014 4:41 pm
by elParaguayo
I've not tried this, but this is the approach I'd take:

1) Forget all about python to start with
2) Find out how to print from the command line (a quick google suggests installing cups and using the lpr command) and work out what command you need to run, including options to scale image etc.
3) Time for python...
4) Download file
5) Use subprocess module to call the "lpr" command (plenty of examples of using subprocess on this forum)

Re: Send a downloaded image to Printer using Pi

Posted: Thu Oct 02, 2014 2:16 pm
by eysi
Hi, Thank you for responding to my query :) :)


but I would like to ask if its feasible if for example the downloaded image will then be copied or be framed into a template , for example , be printed like a polaroid picture ?

Re: Send a downloaded image to Printer using Pi

Posted: Thu Oct 02, 2014 2:19 pm
by forenbenutzer
This should be possible with something like that:

http://ubuntuforums.org/showthread.php?t=1345986