import FormAPI from '@formapi/formapi';
client = new FormAPI.Client();
client.generatePDF('YOUR_TEMPLATE_ID', {
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 = FormAPI::Client.new
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)
<?php
$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(
"YOUR_TEMPLATE_ID",
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 "https://app.formapi.io/api/v1/templates/$YOUR_TEMPLATE_ID/submissions" \
-u "$FORMAPI_TOKEN_ID:$FORMAPI_TOKEN_SECRET" \
-H "Content-Type: application/json" \
-d '{"test": "true", \
"data":{"first_name": "John", "last_name": "Smith"},\
"metadata": { "user_id": 123 }}'
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.
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
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.
Field types include: Text, Number, Boolean, Date, Address, Country, Email, URL, Check, Shape, Image, QR code, Barcode, and Electronic Signature.
FormAPI supports both fillable and scanned PDFs. We automatically import fields from fillable PDF forms, and imported fields can be modified.
Convert HTML to PDF. Use the Liquid markup language to add advanced logic to your templates. Configure layout and styles with SASS.
HTML Editor DemoFormAPI 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.
Only display a field if a value matches a condition. Compute math formulas. Combine values from multiple fields into a single string.
Verify the integrity and existence of your PDF by embedding a SHA256 hash in a Bitcoin transaction.