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

Mehr
1 Jahr 9 Monate her - 1 Jahr 9 Monate her #157319 von Sweden
COM_KUNENA_MESSAGE_CREATED_NEW
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.
Last edit: 1 Jahr 9 Monate her by Sweden.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
4 Monate 1 Woche her - 4 Monate 1 Woche her #179172 von haule1976
COM_KUNENA_MESSAGE_REPLIED_NEW
Please give us an advice for this!
Thank you so much for your help!
Last edit: 4 Monate 1 Woche her by haule1976.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179176 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

Sweden schrieb: … 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 .

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179181 von Mazi
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179185 von haule1976
COM_KUNENA_MESSAGE_REPLIED_NEW
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.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179191 von Mazi
COM_KUNENA_MESSAGE_REPLIED_NEW
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
Folgende Benutzer bedankten sich: haule1976

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179225 von haule1976
COM_KUNENA_MESSAGE_REPLIED_NEW
Thank you so much Mazi!
Kind regards.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her - 4 Monate 1 Woche her #179337 von haule1976
COM_KUNENA_MESSAGE_REPLIED_NEW
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.
Last edit: 4 Monate 1 Woche her by haule1976.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
4 Monate 1 Woche her #179339 von Mazi
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha