Free plan

Form Fields

Read, fill, create or lock the fields of a PDF form
POST
/v1/pdfs/forms

About this tool

A PDF form has boxes you can type in, called fields. This tool can list the fields, fill them with your values, create or edit fields, save the form data, and flatten the form, which means turning the boxes into plain page content so they can no longer be changed. You give the values as a list of field names and answers, or in a data file.
For example, you fill in an application form with your details and then lock it so nobody can change it.

How to use it

  1. Choose this tool.
  2. Add your PDF form with Upload or drag and drop.
  3. Choose what to do, such as list fields, fill, or fill and flatten.
  4. Enter the field names and values, or add a data file.
  5. Press Generate, then download the PDF or the list.

What you get back

You get a new PDF with the form filled or locked, or a list or file of the form data, ready to download.
TEST IT LIVE

Try Form Fields in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/forms
Tool ID
pdfs.forms
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/forms" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'operation=flatten' \
  -F 'format=json' \
  -F 'output_bundle=zip'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.forms({
    "file": 'document.pdf',
    "operation": "flatten",
    "format": "json",
    "output_bundle": "zip"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->forms([
    'file' => 'document.pdf',
    'operation' => 'flatten',
    'format' => 'json',
    'output_bundle' => 'zip',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Read, fill, create or lock the fields of a PDF form. It can do several jobs from one endpoint: operation, enum-field, items.

Form Fields accepts PDF. You can send several files in one request.

Form Fields is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/forms with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.