Skip to main content

Add Form Fields to PDF

FormsAdd Form Fields to PDF

The Add Form Fields to PDF API adds form fields (text boxes or checkboxes) to a PDF at specific positions. You send the PDF as Base64 (docContent), docName, formFieldType (TextBox or CheckBox), fieldName, initialValue, positionX and positionY, Size, pages, and optionally async. The API returns the PDF with the new form fields added. Use the tester below to try it; more details are in the sections that follow.

Try the Add Form Fields to PDF API

:::note Quick reference Endpoint: POST /api/v2/AddFormField · Required: api-key, docContent, docName, initialValue, positionX, positionY, fieldName, Size, pages, formFieldType :::

:::info Try it live Use the form below to send your API key, PDF (Base64), field type (TextBox or CheckBox), name, position, size, and pages. The response is the PDF with the new form field(s). No code required—fill the fields and click Send request. :::

Loading API Tester...

Overview, parameters, and use cases

What is Add Form Fields to PDF?

This endpoint adds one or more form fields to a PDF at specific positions. You choose formFieldType (TextBox or CheckBox), set fieldName, initialValue, positionX and positionY (coordinates on the page), Size, and pages (e.g. 1, 1-3, 1,3,5, 1-). The API returns the PDF with the new fillable fields. Use it to turn a static PDF into a form or add extra fields to an existing form.

Key features

  • Field typesformFieldType: TextBox or CheckBox.
  • Position and sizepositionX, positionY (coordinates); Size (field size).
  • Field identityfieldName (unique name for the field), initialValue (default value).
  • Page targetingpages: 1, 1-3, 1,3,5, 1- (from page 1 to end).
  • Async – Use async for PDFs with many fields.

:::tip Best for Use when you need to add fillable text boxes or checkboxes to a PDF. Pair with Fill PDF Form to populate the fields, or Extract Form Data from PDF to read submitted values. :::

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A PDF document in Base64 format or a public URL to a PDF file

Response Format

The API returns a PDF document with the form fields added at the specified positions.

Get Help