- Posts: 14400
- Thank you received: 2598
Ask the community, share ideas, and connect with other LimeSurvey users!
<a href="/survey/index.php?r=printanswers/view&surveyid=XXXXXX" title="Print" your="" answers.="" class=" ls-print "> Print your answers. </a>
<img src="/upload/files/picture.png" />
currently the pdf is done ONLY after survey is submitted
$html = "&lt;p&gt;Some HTML to put in your PDF.&lt;/p&gt;"; $limeMpdfHelper = new \limeMpdf\helper\limeMpdfHelper(); /* Send pdf file to browser for download */ $limeMpdfHelper->doPdfContent($html);
currently the pdf is done ONLY after survey is submitted
I don't know : this need to be developed … and take time …rickanderson wrote: …
currently the pdf is done ONLY after survey is submitted
...could the report include a button that called 'doPdfReports()' or have the link I suggested previously (copied from the 'Print your answers.' link)?
<a href="/survey/index.php?r=printanswers/view&surveyid=XXXXXX" title="Print" your="" answers.="" class=" ls-print "> Download your PDF. </a>
Dynamically generated Images
You can define a script which generates an image just as you can in HTML:
<img src="/files/my_file_generating_script.php?color=red" />
Yes : but not after user close his survey : current response id is get by $_SESSIONI tried hard-coding the link into the report (via the survey 'End Message'):
<a href="/survey/index.php?r=plugins/direct&plugin=pdfReport&surveyid={SID}&qid={pdf.qid}" title="Print answers" class=" ls-print "> Download your PDF. </a>