Question T18508
Visible to All Users

Set background image to each page of survey

created 10 months ago

Hello

I want to set background image on each page when we download the survey in pdf from.
I am able to set background image using onAfterRenderPage event in survey preview and modal.

but not getting how I can set Background image in pdf file I want to set different image on each page.

Answers approved by surveyjs Support

created 10 months ago (modified 10 months ago)

Hello,
You can customize page rendering using the SurveyPDF.onRenderPage function.

An example on how to render a background image for the entire survey is available at Add Background Image to PDF.

I hope this information helps. Should you have further questions, I'll be happy to assist you further.

    Show previous comments (5)

      You're welcome. Please feel free to contact us if you have further questions.

        Hello

        In above demo can I load image from URL instead of local folder?

          Hello,
          Unfortunately, the canvas.drawImage function doesn't accept image URLs. You may first fetch an image from a URL, convert it to a Base64 string and send to the canvas.drawImage function.

          Let me know if you require further assistance.