Create Fillable PDF Form

The Pdfcrowd HTML to PDF API makes it easy to programmatically create fillable PDF forms from standard HTML forms. The API supports most of the HTML form features and, together with support for digital signatures (see Create Digital Signature in PDF), provides an easy way to create PDF forms.

This feature is available starting with Pdfcrowd API client libraries version 5.6.

Simple Example

Add an HTML form field, for example a text input:

Enter name:

Enable generation of fillable PDF forms with the setEnablePdfForms() method:

client.setEnablePdfForms(true)

The resulting PDF will display an interactive input text field.

Form with Buttons Example

The API supports the submit and reset form actions. The following example uses both button types. The submit button makes an HTTP POST request, the reset button resets the form to the defaults.

   

Agreement

. body of the contract .

I agree with the contract

Fancy Styling

If you want to apply fancy styling, such as a semi-transparent, gradient or image background, horizontal-only borders, and so on, do not style the input element directly, but enclose it in another element and style that element instead.

   Agreement - fancy styling input < width: 100%; height: 100%; border: none; background: none; box-sizing: border-box; >.input-wrapper < width: 2in; height: 1in; border-top: 2pt solid black; border-bottom: 2pt solid black; background:linear-gradient(135deg, #fcdf8a 0%,#f38381 100%); >.input-block 

Agreement

. body of the contract .

Add Fillable Form To Existing PDF

If you have a static PDF (scanned or with a static form), you can use the API to make it fillable. Use the original PDF as a multipage background and place an HTML form over it.