Skip to content
FillFaster

Set Custom Base PDF via API

This guide explains how to use a custom PDF document when creating a submission via the API. This feature allows you to dynamically provide a different PDF file for a submission while leveraging an existing template’s field configuration.

Using a custom base PDF is ideal when you need to maintain a consistent field structure (e.g., signature boxes, date fields in fixed positions) across documents that have different underlying content. Here are some common use cases:

  • Dynamic Documents from External Sources: When the main document is generated by another system and needs to be signed.
  • Personalized Contracts: For generating agreements where recipient data is already merged into the PDF document.
  • Variable Document Length: When the number of pages differs from the original template, but the fields are on pages that exist in both.

The new PDF must have a similar structure to the template’s original document, ensuring that the predefined field locations are still valid.

This feature is especially powerful when combined with Automatically Detecting PDF Placeholder Tags.

You can generate a completely dynamic PDF document that includes placeholder tags (e.g., {signature}, {date_today}, {name}). When you send this PDF as a custom base PDF, FillFaster will automatically detect these tags and convert them into interactive fields for the recipient to fill out.

This allows for a fully automated and dynamic document generation workflow.

To set a custom base PDF, you need to include the formData object with the basePdf property in your submission creation request.

{
"fid": "sfRPPph",
"prefill_data": {
"name": "John Smith"
},
"user_data": {
"uid": 123
},
"formData": {
"formName": "Custom Title for John Smith",
"basePdf": "data:application/pdf;base64,JVBERi0xLjcKJeLjz9MKO..."
}
}
  • fid: The ID of your form template. You can find this in the form’s URL.
  • prefill_data: An object containing data to pre-fill into the form fields.
  • user_data: Optional. Metadata that will be sent back in webhooks.
  • formData: Optional. An object for overriding form settings.
    • formName: Optional. A new name for this specific submission.
    • basePdf: The custom PDF document. This must be a Base64 encoded string, prefixed with data:application/pdf;base64,.