Welcome to the LimeSurvey Community Forum

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

limeMpdf - full page background image - fore each survey

  • sicoda_limesurvey
  • sicoda_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #201090 by sicoda_limesurvey
How can I set a full screen background image individually for each survey? I found the style-custom.tiwg

@page {
background-image: url(' www.123xxx.com/upload/surveys/ 12345/images/pdfbackground.jpg');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height:100%;
}

How can I dynamically update the survey number in the CSS? I didn't find a variable at this point.

Thx Oliver
Last edit: 3 years 9 months ago by sicoda_limesurvey.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201101 by Joffm
Variable for
SurveyID: {SID}
GroupID: {GID}
QuestionID: {QID}
and many more.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • sicoda_limesurvey
  • sicoda_limesurvey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #201115 by sicoda_limesurvey
Replied by sicoda_limesurvey on topic limeMpdf - full page background image - fore each survey
Hi, your idea gave me the right direction. I couldn't get the variable you qouted to work in the twig files but I got it wokring with {{aSurveyInfo.sid}}
Code:
@page {
background-image: url('https://lsomain.com/limesurvey/upload/surveys/{{aSurveyInfo.sid}}/images/background_pdf.png');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height:100%;
}


thx Oliver
Last edit: 3 years 9 months ago by sicoda_limesurvey.
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 9 months ago #201239 by DenisChenu
And it work with limeMpdf ?

Great to know

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