Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Send response pdf in email

  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
4 years 5 months ago #190978 by gabrieljenik
Replied by gabrieljenik on topic Send response pdf in email

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The following user(s) said Thank You: rickanderson
The topic has been locked.
More
4 years 5 months ago #190979 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Hi Gabriel...thanks for the speedy response!

As things stand I am able to successfully generate the PDF and have included a button to prompt the user to download which also works fine. This looks like what pdfReport would do for me? I would like to be able to include this PDF as an attachment to a user-supplied email address. I believe I can use 'html2PDF' to convert the PDF to a Data URI String as per this code (from html2PDF support):

Code:
html2pdf().from(element).toPdf().output('datauristring').then(function (pdfAsString) {
    // The PDF has been converted to a Data URI string and passed to this function.
    // Use pdfAsString however you like (send as email, etc)! For instance:
    console.log(pdfAsString);
});

I would like to know if there is email functionality within LimeSurvey to enable the attachment of this to an email being sent to the user-supplied email address? Wasn't sure from your link if pdfReport would add this capability.

Cheers...Rick.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190994 by DenisChenu
Replied by DenisChenu on topic Send response pdf in email

rickanderson wrote: I would like to know if there is email functionality within LimeSurvey to enable the attachment of this to an email being sent to the user-supplied email address? Wasn't sure from your link if pdfReport would add this capability.
.

Best is to test : pdfReport is done to
1. Save pdf inside survey
2. Send (optionnaly) the pdf to an email (generated with Expression)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: rickanderson
The topic has been locked.
More
4 years 5 months ago #191007 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Thanks both Denis and Gabriel.

I'll look into what I can do with pdfReport.

Cheers...Rick.
The topic has been locked.
More
4 years 5 months ago #191034 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Hi again Denis...quick question re pdfReport.

What version of LimeSurvey do i need to be running to use pdfReport? I am currently running v3.19.3.

I uploaded the pdfReport files to the plugin directory and added a 'File Upload' type question but don't see where I Activate pdfReport (Activate pdfReport : Use this question as pdf report. to Yes).

Cheers

...Rick.
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
4 years 5 months ago #191036 by gabrieljenik
Replied by gabrieljenik on topic Send response pdf in email
Great, let me know if you need some custom PDF solutions. Thanks!

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #191039 by DenisChenu
Replied by DenisChenu on topic Send response pdf in email

rickanderson wrote: What version of LimeSurvey do i need to be running to use pdfReport? I am currently running v3.19.3.

I just check : options are shown in 3.19.3 git version : no issue

rickanderson wrote: I uploaded the pdfReport files to the plugin directory and added a 'File Upload' type question but don't see where I Activate pdfReport (Activate pdfReport : Use this question as pdf report. to Yes)..

You must activate the plugin before
extensions.sondages.pro/about/install-an...-for-limesurvey.html

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: rickanderson
The topic has been locked.
More
4 years 5 months ago #191041 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Cheers Denis...much appreciated, I wasn't aware that plugins had to be specifically activated after upload to 'plugins' directory.

...Rick.
The topic has been locked.
More
4 years 5 months ago #191113 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Hi Denis...thanks for your help so far, I have a couple of final pdfReport questions that you may be able to help me with?

I imported your demo ('pdfreport test survey') to see how you implemented pdfReport and think I am almost good to go. I can't see where the final link on the end page (once survey submitted after End Message) 'Print your answers.' is being added, is this automatically generated?

Also, I assume the emails are only sent if the survey is active as I haven't received any emails yet from testing, is this correct?

Thanks again!

Cheers...Rick.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago - 4 years 5 months ago #191114 by DenisChenu
Replied by DenisChenu on topic Send response pdf in email
Print your answers. is a global LimeSurvey option. You can choose to replace the action by downloding the related PDF

Also, I assume the emails are only sent if the survey is active : ALL is done ONLY when survey is active, the system can not create a file without a response table.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 5 months ago by DenisChenu.
The following user(s) said Thank You: rickanderson
The topic has been locked.
More
4 years 5 months ago #191118 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Thanks Denis...much appreciated!
The topic has been locked.
More
4 years 5 months ago #191274 by rickanderson
Replied by rickanderson on topic Send response pdf in email
Hi Denis...

I had a chance to play with pdfReport on a live survey over the weekend and its working great, thanks again! Based on this I had a couple of other questions that you might be able to help me with or point me in the right direction?

- does the email address input that the report is to be sent to have to be part of the survey? For example, we would like to have an 'Email me this report' input and button on the final page (as part of the 'End Message') after the survey has been submitted, is there any way to accommodate this functionality (i.e. use the button in the report to trigger pdfReport with the supplied email address)?

- the 'Print your answers' link appears at the very end of the report (after the 'End Message' text). Is it possible to move this link to precede the report or to again replicate its functionality from a custom 'Download your PDF' button within the report? I notice the link on the 'Print your answers' link is:

Code:
<a href="/survey/index.php?r=printanswers/view&amp;surveyid=XXXXXX" title="Print" your="" answers.="" class=" ls-print "> Print your answers. </a>

could this be used to replicate the 'Print your answers' functionality in a custom button placed in the 'End Message'?

Finally, the PDF generated by the report didn't handle background images very well (didn't show at all), reading the documentation on the pdfReport GitHub page it mentions adding images via:
Code:
<img src="/upload/files/picture.png" />
or with Data URI...do you know if there is some way to use background images? (I overlay the images to build up a visual representation of the relevant survey results and am not sure if there is a way to replicate this using <img> tags).

Hopefully these make sense but let me know if any further info required. Many thanks...Rick.
The following user(s) said Thank You: Indispirit
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose