, by Denis Chenu

Create your own individual report in PDF and send it to user or admin. See the demo survey for an example.

After download and install plugin, you can use it in any Survey.

The plugin is compatible with 2.06 branch and 2.5X branch

The survey settings (Email)

For the mail content, plugin use existing email templates : confirmation, basic and detailed admin notification.

Setting for the emails in sendPdfReport

You have this setting for : confirmation email, basic admin notification and detailed admin notification.

The plugin don’t de-activate the LimeSurvey system, then you must uncheck send confirmation email if you use token and want to send the PDF to the participant.

Send to
The email address where the plugin send the attachment with the email content. You can use Expression Manager to generate the email address
The question code for the PDF generation. The report is done using the question text, then you can use and validate any expression in this text. You can use any html tag and add some style. A basic css file is added to generate the final report.

If you want to send the pdf to the participant : you must deactivate the confirmation, and use TOKEN:EMAIL for the «Confirmation attachments» setting.

The survey settings (The PDF content)

Setting for the pdf in sendPdfReport
PDF title
LimeSurvey have an option to set pdf title (shown at all page), you can use your own here. Default is the site name.
PDF sub title
The same for subtitle
Logo Name
The logo file name for PDF generation, you can use png, gif or jpg. The logo file can be (in order) in template, in survey files directory, in survey images directory or in survey upload directory. Then you can have easily different logo for each survey and can easily update it.

Some advice for the PDF generated:

Try to use some base element only : h1, h2, h3, p, ul and li, em , strong. You can add color with style, for example:
<p>Here is you report : you have a score of <strong style="color:green">{Score.NAOK}</strong>.</p>

You have a way to generate break page in the pdf with : <br pagebreak="true" />

You can include image in the report : if image is not found, it was replaced by a 1 point white image. Image can be file in the survey or template, but can be external files too.

For image : remind the pdf use cm or inch for production : then the best is to set width and height in cm , and not in pixels.

Pdf file name : global settings

Global settings for the genrated pdf

There are some global settings too, about the file name of the pdf. You can choose and update part of name here.

Default behavior are : email type + [underscore] + survey id + [underscore] + response id

Use token for file name.
If survey have token, then replace response id by the token. If user upadte his answers : this can replace an existing file/
Base file name for confirmation pdf file
The base file name for confirmation, default are confirm, this replace the email type.
Base file name for admin_notification pdf file
Same for basic admin notification.
Base file name for admin_responses pdf file
Same for detailed admin notification.
Directory on the server to move the file after send
After sending email, you can save the generated pdf anywhere on the server. The web server user need write access inside this directory. For security purpose : it’s better to put this file in a directory not accessible by web. The generated pdf is saved even if email is not send

View online : Demonstration of functionnality