Automatic printing

Snurre

Well-known member
Hey
Is it possible to send a specific file (PDF) directly to my wifi printers ip-adress, without opening it
I have tryed several different options but I'm stock
My thoughts was something like Http request, send intent, UDP or what ever
Totally dummy around this
Is it possible ?
 

tanutanu

Well-known member
Hey
Is it possible to send a specific file (PDF) directly to my wifi printers ip-adress, without opening it
I have tryed several different options but I'm stock
My thoughts was something like Http request, send intent, UDP or what ever
Totally dummy around this
Is it possible ?
Generally if your printer itself has ability to render the pdf, it should be possible. If not, some pdf viewer app and/or system/each vendor's print service might make it easier, but I think you need to open your docs with a command line tool maybe. Sorry I can't recommend because it depends on your environment.
As a googling result, it might help you.
 

Snurre

Well-known member
Yeah I see your point, and I'm almost shure that my printer can render the file
It's not a problem to open it, I've got a macro that opens it in a viewer but then I have to click twice for it to print
That could be done with UI but thats not an option for me because I've got a flip phone and UI don't work when closed
I have googled and googled and googled it's a hard nut to crack
Tryed to figure out a way to send intent to my printer, not working
My printer is HP and I can use a feature called hpeprint, where I can send a mail to a printer mailadress, I'm using that for now, but I would still try if it's possible to send directly to the IP
Thx for trying 🍢
 

tanutanu

Well-known member
Yeah I see your point, and I'm almost shure that my printer can render the file
It's not a problem to open it, I've got a macro that opens it in a viewer but then I have to click twice for it to print
That could be done with UI but thats not an option for me because I've got a flip phone and UI don't work when closed
I have googled and googled and googled it's a hard nut to crack
Tryed to figure out a way to send intent to my printer, not working
My printer is HP and I can use a feature called hpeprint, where I can send a mail to a printer mailadress, I'm using that for now, but I would still try if it's possible to send directly to the IP
Thx for trying 🍢
Well, I think the email access is enough elegant but you don't be satisfied, I know;)
As the stack overflow thread, it wound be possible to use foxit app and am command on Termux. MD can handle Termux as the plugin, so it could be realized, I guess:)
I think it worth trying🍺
 

Snurre

Well-known member
My biggest problem is that I want to automate it so it sends the same file (print) every 2 weeks or so
MD can do that, but only text
It would be nice to have the possibillity to attach a file or insert a picture in the mail
 

dsnz

Well-known member
My biggest problem is that I want to automate it so it sends the same file (print) every 2 weeks or so
MD can do that, but only text
It would be nice to have the possibillity to attach a file or insert a picture in the mail
first, sending directly to printer is impossible , complicated protocols are used , it's not a simple http send
other option is to find a printer driver that supports intents .. which is probably impossible today (maybe in far future πŸ˜‚, for example I checked my Samsung driver and it does not support them)

however the ePrint option from HP seems great πŸ˜ƒ
and this document


says that it's possible to send and print photos
(it's a must for Deskjet photo printers after all)
so you must find out why it does not work for you
(eg. is it due to the email agent program used ?)
 

Snurre

Well-known member
says that it's possible to send and print photos
(it's a must for Deskjet photo printers after all)
so you must find out why it does not work for you
(eg. is it due to the email agent program used ?)
Yeah that works fine, what I meant was that in MD it's not possible to send e-mail with pictures or attachment
I think that's a little odd, because it's possible in 'Share last photo' to send via email
 

dsnz

Well-known member
Yeah that works fine, what I meant was that in MD it's not possible to send e-mail with pictures or attachment
I think that's a little odd, because it's possible in 'Share last photo' to send via email

now I understood your real issue,

some ideas
- request new feature to attach files in emails
- use a mailer/shortcut/plugin ... that sends email externally from macrodroid,
MailTask which is a plugin in play store seems very promising
- somehow make the image you want to email be the last photo (make a new copy with shell script to gallery) and then use macrodroid's action to email last photo
 

Snurre

Well-known member
now I understood your real issue,

some ideas
- request new feature to attach files in emails
- use a mailer/shortcut/plugin ... that sends email externally from macrodroid,
MailTask which is a plugin in play store seems very promising
- somehow make the image you want to email be the last photo (make a new copy with shell script to gallery) and then use macrodroid's action to email last photo
Thx
I'm requesting a little later
I've tryed with Gmail, Samsung mail, Boomerang and a few others πŸ˜…
I can't get any of them to send without some sort of click/confirm
MailTask should do it, but only sends the link to the file, so no luck there either
The last option was also in my thoughts, I'm not shure it works, in the description it says "share last photo taken with the camera", but it's worth a try πŸ˜‰
For the moment I'm using exactly that action, but just until I take a new picture. 🀣
 

dsnz

Well-known member
mmm
if MailTask sends a link then where does that link point to ?? to which website ??
(I haven't used MailTask and I find this thing about the link both strange and kinda dangerous regarding privacy)
last photo should be the last file in any directory in DCIM and should have nothing to do with Camera app (you can try action "Open last photo" to verify this) so you can have a directory of your own below DCIM and copy to it the image you want to print and then use the "Share last photo" action
 

Snurre

Well-known member
Arg, sorry bad formulation ☹️
It sends"content:path to local file" not a linkπŸ˜‰
Your suggestion sounds ok, i'll try that πŸ‘
 

Snurre

Well-known member
last photo should be the last file in any directory in DCIM and should have nothing to do with Camera app (you can try action "Open last photo" to verify this) so you can have a directory of your own below DCIM and copy to it the image you want to print and then use the "Share last photo" action
Nope, don't work for me
 

dsnz

Well-known member
what exactly does not work ?
- the copy to DCIM directory
- the Show last photo action

and in which Android are you ?
 

Snurre

Well-known member
I can copy to a print directory under DCIM and show last photo works, it's just not the photo I just copied
And I'm on Android 12
 

dsnz

Well-known member
there is something called Mediastore on Android (kind of database)
with all gallery photos and I think it's this that MD asks for the last photo
it should be updated after some time automatically
I have long time to work with Android development and I certainly miss all the latest nuances on how this stuff works
I will try to find out because it's interesting but honestly don't expect much
I hope @MacroDroidDev can shed light on this
 

Snurre

Well-known member
Thx, Yeah it's somekind of an interesting problem
I'm also trying all kind of things, so it's just to hope 🀞
Appriciate your help πŸ‘
 

dsnz

Well-known member
@Snurre
out of curiosity I installed MailTask and sent a test email with an image as attachment and it worked instantly and perfectly (with Gmail account)
definitely attachments are attached (πŸ˜‚) , so.. maybe you should try again ?
 

Snurre

Well-known member
@Snurre
out of curiosity I installed MailTask and sent a test email with an image as attachment and it worked instantly and perfectly (with Gmail account)
definitely attachments are attached (πŸ˜‚) , so.. maybe you should try again ?
OMG
I must have been a "little" confused with all these testings 🀣
I tested MailTask several times with no luck
Now, I just realised I tryed it on my old phone on Android 10, there I could'nt get it to work 🀣
But now on my Android 12 it works perfectly πŸ˜ƒ
Thank you very much for your help πŸ‘πŸ€—
 
Top