Add a Background Image to a PDF Form
SurveyJS PDF Generator enables you to customize PDF forms by adding images and annotations to a resulting PDF document. For example, you can style the background of your PDF form with your brand's own design language to create a visually appealing document that stands out. To add a background image, handle the onRenderHeader
event raised by the SurveyPDF
object. An event handler accepts a DrawCanvas
object as the second parameter. Use its drawImage()
method to render an image. If this image should occupy an entire PDF page, use the rect
property to specify the drawing area as shown in the code listing.