I tried to post on an old thread but I should probably have started my own thread instead (my request is a bit different).
Okay, so I found this comment:
tammo wrote:
since the PDF output from LimeSurvey is a bit hard to alter, we use MPDF implemented in the backend. This works great, but you have to do some styling yourself.
www.mpdf1.com/mpdf/index.php
Very interesting so I send a private message to Tammo (I might as well post my question here so other people can benefit from any answers I might receive. And maybe someone else knows the answer to my question).
So here is my question:
How can I implement MPDF (PDF file generator) so it can create a PDF file at the end of the survey? My goal is that the survey participants answer a couple of questions and based on their answers they will receive some advice when they click the NEXT button (for that I use "Text display" as question type including "Relevance equation"). I would like to have a "Save this page as PDF" button on that page. MPDF looks great, but I haven't got a clue how to make it work. I have used a couple of days trying to figure out how I can make it work, but I really don't know much about php etc. How do you send the php to MPDF (can it use the content in a div and then make a pdf out of it??). Also, where do I insert code without creating a big security hole?
Any help would be appreciated - even a few hints and tips would be a great help. Thanks.
PS: The code below is something I found while searching for a solution, but I don't know how to customize it so it will work.
Code:
<?php
$content = get_include_contents('??????');
include('./mpdf/mpdf.php');
$mpdf=new mPDF();
$mpdf->WriteHTML($content);
$mpdf->Output(example.pdf,'D'); exit;
?>