FormAPI makes it easy for programmers to generate PDFs.

Sign Up
  • JavaScript
  • Ruby
  • Python
  • PHP
  • C#
  • Terminal
import FormAPI from "formapi";

client = new FormAPI.Client();
    test: true,
    data: { first_name: "John", last_name: "Smith" },
    metadata: { user_id: 123 }
  function(error, response) {
    console.log("Download your PDF at: " + response.submission.download_url);
require 'form_api'

client =
response = client.generate_pdf(
  template_id: 'YOUR_TEMPLATE_ID',
  test: true,
  data: { first_name: 'John', last_name: 'Smith' },
  metadata: { user_id: 123 }
puts "Download your PDF at: #{response.submission.download_url}"
import form_api

client = form_api.Client()
submission = client.generate_pdf({
    "template_id": "YOUR_TEMPLATE_ID",
    "test": True,
    "data": { "first_name": "John", "last_name": "Smith" },
    "metadata": { "user_id": 123 }
print("Download your PDF at: %s" % submission.download_url)
$formapi = new FormAPI\Client();
$response = $formapi->generatePDF("YOUR_TEMPLATE_ID",
  new FormAPI\Model\CreateSubmissionData([
    "test" => true,
    "data" => [ "first_name" => 'John', "last_name" => 'Smith' ],
    "meta_data" => [ "user_id" => 123 ]
echo "Download your PDF at: " . $response->getSubmission()->getDownloadUrl();
using System;
using FormApi.Client.Api;
using FormApi.Client.Client;
using FormApi.Client.Model;

public class FormAPIExample
    public void main()
        var formapiClient = new PDFApi();
        var response = formapiClient.GeneratePDF(
            new CreateSubmissionData(
                true,                                            // test PDF?
                new { firstName = "John", lastName = "Smith!" }, // data
                new { userId = 123 }                             // metadata
        Debug.WriteLine($"Download your PDF at: {response.Submission.DownloadUrl}";
curl -s -X POST "$YOUR_TEMPLATE_ID/submissions" \
  -H "Content-Type: application/json" \
  -d '{"test": "true", \
"data":{"first_name": "John", "last_name": "Smith"},\
"metadata": { "user_id": 123 }}'

PDF Template Editor

No need to tweak x and y in your editor. Drag-and-drop fields using FormAPI's visual template editor, then set data types and conditions.

Template Editor Demo

Schema Validation

Every template comes with a JSON Schema. API requests are validated against this schema, so you'll never leave a field blank by mistake.

Example Schema

Online Forms

Fill out a web form to generate a PDF.
Embed a form on your own website.
Easily fill out fields with random data to test your template.

Online Form Demo

Stay up to date with our latest news and features:

Template Field Types

Field types include: Text, Number, Boolean, Date, Address, Country, Email, URL, Check, Shape, Image, QR code, Barcode, and Electronic Signature.

Fillable PDF Forms

FormAPI supports both fillable and scanned PDFs. We automatically import fields from fillable PDF forms, and imported fields can be modified.

HTML / CSS Templates

Convert HTML to PDF. Use the Liquid markup language to add advanced logic to your templates. Configure layout and styles with SASS.

HTML Editor Demo


FormAPI can send webhooks or post a message to Slack when a PDF is generated. More integrations are coming soon, such as Dropbox, Google Drive, Zapier, and IFTTT.

Template Logic

Only display a field if a value matches a condition. Combine values from multiple fields into a single string.


Add calculations to your PDF templates, like an Excel spreadsheet. Just send the required data, and we'll fill out the calculated fields.

Ready to get started?

Start your 14 Day Free Trial