Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Styling prints to PDF

  • mathilderadhouane
  • mathilderadhouane's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 3 weeks ago #214457 by mathilderadhouane
Styling prints to PDF was created by mathilderadhouane
Hi everyone, 

We are trying to style the PDF output on the cloud version of LimeSurvey. In order to do so, we have copied the fruity template and modified a few twig template so that we do not print the answer IDs. This is working.
We cannot however change the styling via the custom.css file. If I input a style="color:red;" in the twig template, that works, but h3 {color:red;} in the custom.css file does not. 

Would you know where and how to change the css properties to style the export? Our end goal is to have the PDF output look like the HTML page, or at least have more than one question per page.

Thanks for your help,
Mathilde
The topic has been locked.
More
3 years 3 weeks ago #214461 by jelo
Replied by jelo on topic Styling prints to PDF

We cannot however change the styling via the custom.css file. If I input a style="color:red;" in the twig template, that works, but h3 {color:red;} in the custom.css file does not.

 

Bootstrap 3 is used in LimeSurvey. So I would try e.g  .h3, h3 { color:red; }

Other example
forums.limesurvey.org/forum/design-issue...-survey-title#202053

 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 weeks ago #214465 by DenisChenu
Replied by DenisChenu on topic Styling prints to PDF

We are trying to style the PDF output on the cloud version of LimeSurvey. In order to do so, we have copied the fruity template and modified a few twig template so that we do not print the answer IDs. This is working.
 
You can include some style part (not a style file) extending your theme and adding it in layout_print if it's a print answer part.
 

Boostrap is included only for HTML view, but more boostrap system can not work with boostrap.css

You can open a ticket on SAAS support
And create ticket on community.limesurvey.org/feature-request/
(check this one : bugs.limesurvey.org/view.php?id=14569 )

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 weeks ago #214475 by tpartner
Replied by tpartner on topic Styling prints to PDF
I think that should be a <style> tag. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 weeks ago #214482 by DenisChenu
Replied by DenisChenu on topic Styling prints to PDF

I think that should be a <style> tag. :)
 
And you're totally right !

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • mathilderadhouane
  • mathilderadhouane's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #214503 by mathilderadhouane
Replied by mathilderadhouane on topic Styling prints to PDF
Hello,

Thank you all for your help. 

Jelo: your solution was only working for the HTML page, the title indeed turned red but not in the printed PDF. The example you linked were useful though. 
DenisChenu: your solution worked, I wanted to avoid mixing twig and CSS but if you advise for it, that's what i'll do. I also checked the ticket youa re referencing, it is intersting, in particular the attached PDF, it should help me understand how the printer works. I'll study that and open a ticket if I need more help. 

Thanks again both,

Hedi
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214504 by DenisChenu
Replied by DenisChenu on topic Styling prints to PDF
Great news if it work !

You need it for Public printanswer then ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose