Documentation Docs
Documentation Docs

PDFFormFiller

A plugin that enables you to fill interactive fields in existing PDF forms.

This plugin requires a third-party library, such as pdf-lib or PDF.js:

View pdf-lib Demo

View PDF.js Demo

Inherited from the following class(es):

Methods
Events
data property

An object with data used to populate the PDF document.

Use the SurveyModel's data property to access this data object.

View pdf-lib Demo

View PDF.js Demo

Type:
any readonly
Implemented in:
PDFFormFillerBase
fieldMap property

An object that maps survey fields to PDF form fields. Object keys are survey field names and object values are PDF form field IDs.

The easiest way to build a field map is to access the data object with respondent answers using the SurveyModel's data property and replace the values with the PDF form field IDs. To find the IDs, open your PDF document in any editor that allows viewing them. Note that certain field types, such as Checkboxes, Dynamic Matrix, and Dynamic Panel require a different configuration. Refer to the following demos for code examples.

View pdf-lib Demo

View PDF.js Demo

Type:
any readonly
Implemented in:
PDFFormFillerBase

An adapter that serves as a bridge between the PDFFormFiller plugin and a specific third-party library.

SurveyJS PDF Generator provides adapters for pdf-lib and PDF.js out of the box. Pass the libraries to the PDFLibAdapter or PDFJSAdapter constructor and assign the resulting instance to the pdfLibraryAdapter property.

View pdf-lib Demo

View PDF.js Demo

Type:
IPDFFormAdapter readonly
Implemented in:
PDFFormFillerBase
pdfTemplate property

A PDF document with interactive form fields that you want to fill.

Because this document is passed on to a third-party library, the type of accepted values depends on this library.

View pdf-lib Demo

View PDF.js Demo

Type:
any readonly
Implemented in:
PDFFormFillerBase
raw method

An asynchronous method that allows you to get PDF content in different formats.

Type:
(type?: "blob" | "bloburl" | "dataurlstring") => unknown
Parameters:
type, type: "blob" | "bloburl" | "dataurlstring" ,

(Optional) One of "blob", "bloburl", "dataurlstring". Do not specify this parameter if you want to get raw PDF content as a string value.

Implemented in:
PDFFormFillerBase
save method

An asynchronous method that starts to download the filled PDF form in the web browser.

View pdf-lib Demo

View PDF.js Demo

Type:
(fileName?: string) => any
Parameters:
fileName, type: string ,

(Optional) A file name with the ".pdf" extension. Default value: "FilledForm.pdf".

Implemented in:
PDFFormFillerBase

Copyright © 2025 Devsoft Baltic OÜ. All rights reserved.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.