Skip to content

PDF-SDK 2.4.1 is out.See what’s new

PDF-SDK
Forms

Fill PDF forms — and build new ones

Your users fill in the forms they already have, and you add the fields that are missing. Read and set every value from code, then flatten the result.

Try it in the live demo

Every PDF form field, filled or created.

  • Fill every field type

    Text fields, checkboxes, radio buttons, list boxes and dropdowns — and the signature fields a form contains.

  • Create fields

    Add text fields, checkboxes, radio groups, list boxes and dropdowns, with their options, anywhere on a page.

  • Style them

    Set a field’s fill, border and text colours and its border width; move and resize it by hand.

  • Read and set values

    List every field with its type and value, and set values by name from your code.

  • Reset

    Return a form to its original values in one step.

  • Flatten

    Bake the fields into the pages: the values stay, and they can no longer be edited.

From your code.

Lists the fields, fills one, adds a dropdown and flattens. The same document API exists on iOS and Android.

See the API reference
const doc = await PDFDocumentEditor.open(bytes);

for (const field of doc.formFields()) console.log(field.name, field.kind);
doc.setFormValue('fullName', 'Ada Lovelace');

doc.addFormField('dropdown', 0, { x: 72, y: 400, width: 200, height: 24 }, {
  name: 'country', options: ['India', 'Germany', 'Japan'],
});
doc.flattenForm();          // keep the values, stop the editing
const filled = doc.save();

Forms questions.

Users fill text fields, checkboxes, radio buttons, list boxes and dropdowns. You can create text fields, checkboxes, radio groups, list boxes and dropdowns.

Yes. List the fields with their types and values, and set any value by the field’s name.

Yes. Flattening bakes the fields into the pages: the values stay, and they are no longer editable.

Try it in your app.

A free trial unlocks every feature on every platform, in any app. Open a document today.

Talk to us

Questions about licensing, several apps, volume, or OEM and site terms — we will work out what fits.