PDF: Save text (group description + text display questions) from survey as PDF?

Plus d'informations
il y a 1 an 10 mois - il y a 1 an 10 mois #157319 par Sweden
There are apparently lots of ways to convert html pages to PDF (mpdf, fpdf, html2pdf, wkhtmltopdf, jsPDF etc. etc.), but no one really descripes how to convert e.g. a generated page from LimeSurvey into a PDF file (at least not in details). Haven't really tried too many options because I simply don't know where to start and where to insert code etc.

User should be able to save/download what is seen on screen as PDF file (must work with the most common browsers on PC, iOS, Android devices etc.) What is the most simple way? I don't need a lot of choices - I don't care if pagebreaks, page size, margins etc. are a little bit off. Don't need or want to store the PDF result on server and I don't need a solution that can email the PDF file. Also don't need header and footer (although it would be nice).

In my survey (not public yet), equations control what is seen on the screen (a combination of Group Description and Text Display Questions) - this combined text is shown before the end page and it would be nice to have a "Save as PDF" button on that page. Browsers "print as PDF" option isn't a good option (hyperlinks in text don't work etc. - each browser has its problems).

Have used so much time searching for a solution on/off through the years, but have never found a way to do this. I really hope someone can help!? Based on the amount of similar posts in this forum, it seems like many people request a good way to save survey text (only what is shown on the screen) as PDF.
Dernière édition: il y a 1 an 10 mois par Sweden.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 5 mois 1 semaine - il y a 5 mois 1 semaine #179172 par haule1976
Please give us an advice for this!
Thank you so much for your help!
Dernière édition: il y a 5 mois 1 semaine par haule1976.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179176 par DenisChenu

Sweden écrit: … Don't need or want to store the PDF result on server and I don't need a solution that can email the PDF file. Also don't need header and footer (although it would be nice).…

Browsers "print as PDF" option isn't a good option (hyperlinks in text don't work etc. - each browser has its problems).

In my opinion :
If you want to be like "What you see is what you print" browser print is the best solution.

If you want to have same print for all browser : then you need to construct the PDF yourself using PHP and a pdf library.

And yes : PHP developer is a real work, a real job …⋅

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179181 par Mazi
We had to deal with such requirements at many of our projects and form our experience using a PDF library can not only cause lots of trouble but is also very complex to implement.
For that reasons, we usually add a "Print overview" button to our summary pages. That button uses some JavaScript to call the browser's print feature. Most modern browsers nowadays support printing to PDF directly.

Note that optimizing the print CSS for proper print output for different browsers can be quite a pain but is still easier than using a PDF library and doing lots of PHP coding for generating the PDF which often also doesn't look well.

If you need help with your project feel free to drop us a note.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179185 par haule1976
Dear Mazi,
Could you please help me to guide some steps ?
How can build "Print overview" button and print out pdf directly with CSS ?
Where do we need to insert css code into ?
...
Many thanks for your help!
Best regards.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179191 par Mazi
Use HTML at the question or end text to create a proper button: www.w3schools.com/tags/tag_button.asp

Then add some JS to call the print feature if the button gets clicked: www.thoughtco.com/how-to-add-a-print-button-4072006

Later you can edit the custom.css file to add special print css to optimize the formatting of the printed output (this can be tricky).: benfrain.com/create-print-styles-using-css3-media-queries/

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com
Les utilisateur(s) suivant ont remercié: haule1976

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179225 par haule1976
Thank you so much Mazi!
Kind regards.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine - il y a 5 mois 1 semaine #179337 par haule1976
Dear Mazi,
I am newbie but I tried to do as your guide and I got good results with item 1 & 2.
item 1: Use HTML at the question or end text to create a proper button
item 2: Add some JS to call the print feature if the button gets clicked
Now, I am stranded with item 3: Edit the custom.css file to add special print css to optimize the formatting of the printed output...
Could you please help me to explain this item.
Many thanks for your guidance!
Best regards.
Dernière édition: il y a 5 mois 1 semaine par haule1976.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 5 mois 1 semaine #179339 par Mazi
Hmm, I can't really explain the CSS adjustments, it depends on what you want to see at the printout. For example, we usually hide the header and footer and sometimes some further elements of the to be printed page. Often you also want to define how page breaks at the printout should be done. All this can be done at the custom.css using media queries for printing.
Note that CSS is a complex topic and for such special things you may need some experience or read and learn a lot. Alternatively, just contact us if you need a little paid support to fix certain details at the printout.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!