Summary response: this module adds no functionality other than what you can do with rules, so any extra functionality has to either be coded and integrated in rules unless some rules recipe can fit the need.

I see from the print module issue tracker (https://drupal.org/node/1434438) that you have created this module to allow user to email a PDF by mail.

I have went through the entire thread but I don't understand how I can do this using this module.
I am interested to email a pdf copy of the page instead of html page using the "Send by mail" option from the print module. Is this the functionality you have implemented using rules?

Can you provide a sample rule I can import into rules to do this?
If possible, include such rule with this module, so others can use it upon installation.

Comments

hanoii’s picture

There's really not a simple use it all rule as it depends of a number of cases. First I don't understand what you want to do, but I assume you have a rules trigger that you can hook up the rule and that you are familiar with using rules, if that's the case and once you chose your event that trigger the rule the only think you need to do is to download the "pdf" as you would download any file, which is what this module does. Once you do that, then you can run the action of this module to fetch the real path of the file, and with that you can use that data to feed the mimemail's module provided action to send an email in the attachment field. I don't have time to build a complete rule right now, if I can sometime this week I will try to.

Let me know if you got aorund it with these pointers.

ericwongcm’s picture

The problem is I am not sure what to select for the "React on event" option. I don't see anything in the list that is appropriate for what I want to do.

Let me explain what I am trying to do again.
1) After print module is installed and "Send by email" submodule enabled
2) Clicking the Send by email option will enter the url like ../printmail/6
3) Using this page allows the user to sent an html version of this node page to any e-mail address entered.
What I want to do is that instead of sending this html page, I want to sent a pdf version of this node page.

rules_download seems to be designed and coded for this purpose but I have no idea how to sent pdf by e-mail using it...

I am looking forward to see your rule export when you have time to provide one.

hanoii’s picture

Sending the pdf by email is not the main issue as that should be straightforward. What I suggest you, so that you get familiar with both rules and this module, is to use a rule that you can control for tests. Try "content is updated" for the "React on event". That will happen after you edit one node.

Once there, you should be able to follow the instructions I gave you above. First get to a working rule in which you can actually send at least an email (without any pdf) using mimemail. Once you have that, you should be able to follow the instructions.

As for your specific functionality, I believe is beyond the scope of this module. You need to find so that a rule is executed when following a link or hook into the printmail functionality so that it triggers the rule or changes the module approach, but is definitely beyond this module.

The purpose of this module is to download a file and and make it available to be used within rules, just that. It can definitely be used for what you need but not out of the box as far as I can tell, you'd probably need some coding.

ericwongcm’s picture

Thanks for your prompt reply. Sounds like it will be easier if e-mail pdf is implemented inside print module rather than via rules.

hanoii’s picture

Status: Active » Fixed

Easier for your use case, definitely. Using this module gives a lot more flexibility into when and how send such a pdf, but yes, I can't think of a way doing what you need without some coding.

hanoii’s picture

Title: Rules to email a PDF by mail » Is it possible to allow the user to a send PDF by mail to someone?
Issue summary: View changes
hanoii’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.