Digital transformation

Best PDF Filling API for Document Automation

Mang-Git Ng
By Mang-Git Ng

The best PDF filling API depends on how much workflow surrounds the fill operation. Anvil is the strongest pick for teams that want JSON-based PDF filling, fast template setup via Document AI, and a clear path to e-signatures and workflow orchestration on one platform. DocuSign fits enterprises already invested in an agreement stack. PandaDoc covers document generation and embedded editing alongside signing.

PDF Fill
Workflows
Back to all articles
Post hero image

TL;DR

  • Anvil is the top pick for developers who want one REST API that fills PDFs, collects e-signatures, and runs full workflows.
  • For combined fill and e-signature in a single workflow, Anvil beats stitching together a separate signing service, since 68% of mid-market buyers prefer one platform for both.
  • For HR onboarding, Anvil's conditional logic builds state-specific packets and compresses a two-week manual process to roughly two days.
  • For flat PDFs with no form fields, Anvil's Document AI auto-detects fields using line and box detection, so you skip manual coordinate placement.
  • Anvil's free plan covers 500 API calls per month, with additional calls at $0.10 each.

What Is a PDF Filling API?

A PDF filling API lets you write data into a PDF programmatically, sending a JSON payload of field values and receiving a completed document back. A fillable PDF carries embedded form fields, each one a named object an API can target directly. A flat PDF is a static image of a document with no machine-readable field layer, so there is nothing for the API to write into. Filling a flat PDF means detecting where the fields should go and placing data at those coordinates, which most tools cannot do on their own. When you evaluate a PDF filling API, check whether it handles flat PDFs natively, because many forms you receive from clients and agencies arrive flattened.

Quick Picks by Use Case

  • Simplest REST integration: Anvil. POST a JSON body keyed by field IDs to one endpoint and get filled PDF bytes back, with SDKs for JavaScript, Python, C#/.NET, and Java.
  • E-signature and fill in one workflow: Anvil combines fill, e-sign, and webform building blocks in a single Workflow, so you avoid stitching together two vendors.
  • HR onboarding automation: Anvil. Conditional logic builds state- and role-specific packets, and 68% of mid-market buyers prefer a single platform for generation plus e-signature, per Anvil's HR onboarding research.
  • High-volume batch generation: Anvil. One API call produces hundreds of personalized packets, and pricing runs $0.10 per call past the free 500/month.
  • Compliance-heavy regulated industries: DocuSign for enterprise e-signature orchestration with SOC 2, HIPAA, and eIDAS coverage at scale.
  • Flat PDF tagging: Anvil. Document AI auto-detects fields on PDFs with no existing form layer using line and box detection, so you skip the manual vision-model workaround.

PDF Filling API Comparison

Four tools lead PDF filling and document automation in 2026. They split between developer-first fill APIs and signature-led platforms that treat filling as a side feature.

Tool

Best For

Flat PDF support

E-signature included

Free tier

Starts at

Anvil

Developers needing fill, sign, and workflows in one API

Yes, auto-detected via Document AI

Yes

500 API calls/month

$0.10 per fill

DocuSign

Enterprise e-signature orchestration

Limited

Yes

Trial only

Contact sales

PandaDoc

Sales proposals and CRM-linked documents

Limited

Yes

Trial only

Per-seat plans

Dropbox Sign

Reliable e-signature API with broad SDKs

No native fill intelligence

Yes

Test mode only

$75/month

Anvil

Anvil is the only tool here that fills a flat PDF without you writing tagging code first. Upload any PDF and Anvil's Document AI auto-detects form fields, including documents with no interactive widgets at all. For flat PDFs it uses line and box detection to place fields by coordinate, so a static government form becomes fillable without manual setup. You can test the upload flow without signing up using Anvil's PDF filling API.

The fill API itself is a single REST endpoint. You POST a JSON body to /api/v1/fill/{pdfTemplateID}.pdf with a data object keyed by field IDs, and Anvil returns the filled PDF as binary bytes. Nested objects work for grouped fields like a name split into first, middle, and last, and top-level keys let you set title, font size, and text color in the same call, as detailed in Anvil's fill API docs.

Anvil ships official open-source SDKs for JavaScript and TypeScript, Python, C# and .NET, and Java, each with typed models and streaming download support. Conditional logic runs through Anvil's "casts" language, so a packet can change its composition based on the data you send. A full-time California hire and a Texas contractor receive different documents from the same pipeline, as shown in Anvil's onboarding research.

Fill is one building block among several. Anvil combines fill, e-signature, and webforms inside Workflows, and you can publish a Workflow as its own production API for downstream systems to call. A Zapier integration covers no-code automation, and a single API call can generate hundreds of personalized packets at once, per Anvil's PDF filling API.

Pricing is metered and published upfront. PDF fills cost $0.10 each on a pay-as-you-go basis with no minimum volume commitment, and new accounts get 2,500 starter credits before billing begins. The free plan includes 500 API calls a month, paid platform plans start at $99/month for the AI Pack, and bulk pre-purchase unlocks at 25,000+ fills. Annual billing cuts 20% off, and Anvil holds SOC 2 Type II, GDPR, HIPAA, and eIDAS compliance, as listed on Anvil's pricing page.

Best for: Developers who want flat PDF support, fill, e-signature, and composable workflows behind one clean REST API.

DocuSign

DocuSign built its business on enterprise e-signature, and the API reflects that priority. Most teams reach for it when they need signature orchestration at scale, with routing rules, multi-party approval chains, and the audit trails that legal and compliance departments demand. The platform carries the certifications regulated industries require, including SOC 2 Type II, HIPAA support, and eIDAS for cross-border agreements, which is why banks and insurers default to it for contract execution.

PDF filling exists in the DocuSign API, but it sits underneath the signature workflow rather than standing on its own. You can place fields on a document and populate them before sending for signature, yet the model assumes the end goal is a signed agreement. If you want to fill a PDF and return the bytes without involving a signing ceremony, you fight the grain of the product. Developers building pure document generation pipelines, where the output is a completed form rather than an executed contract find the signature-first design adds steps they do not need.

Flat PDFs expose the same limitation. DocuSign expects you to tag fields by hand or work from documents that already carry form fields, so a stack of scanned government forms means manual placement before any automation runs. Anvil's Document AI removes that step by auto-detecting fields on upload.

Pricing follows an enterprise sales motion rather than a transparent published rate card for API access. DocuSign lists plans for individual and small-team signing, but API and developer tiers route through sales conversations and annual contracts sized to volume. You will not find a per-call rate like Anvil's $0.10 published upfront, which makes early cost modeling harder for a small team evaluating the API on a trial.

Best for: enterprises that need signature orchestration and compliance coverage as the primary job, with PDF filling as a supporting step rather than the core workflow.

PandaDoc

PandaDoc builds documents from templates and drives them through a sales cycle, which makes it strong for proposals, quotes, and contracts tied to a CRM. Its editor lets your sales team assemble a proposal from reusable blocks, drop in pricing tables, and route it for signature without touching code. Native connectors to Salesforce, HubSpot, and Pipedrive pull deal data straight into the document, so a rep can generate a quote from an opportunity record in a few clicks.

That editor-first design breaks down for a programmatic fill pipeline. The platform optimizes for a human creating one document at a time inside the editor, not a backend service POSTing JSON to fill hundreds of PDFs from a database. If your goal is to take an existing flat PDF, map field IDs to values, and return filled bytes on demand, PandaDoc routes you toward template authoring in its UI rather than a clean fill-by-ID endpoint like Anvil's fill/{pdfTemplateID}.pdf.

At volume, the cost model makes the problem concrete. PandaDoc's API Developer Plan runs $40/month for 40 documents, with additional documents at $4 each. A team filling 500 PDFs a month pays $1,880 before any platform overhead. Anvil's metered model charges $0.10 per fill, so the same volume costs $50. PandaDoc's pricing makes sense when the document includes editing, approval routing, and signature. It makes less sense when the job is fill-and-return.

API access requires a higher business tier, and enterprise pricing routes through sales rather than a published rate card. For a sales org that already lives in its CRM, that tradeoff is reasonable. For an engineering team building an automated fill service, it is not.

Best for: sales and revenue teams generating CRM-linked proposals and quotes, not developers building bulk programmatic PDF fill pipelines.

Dropbox Sign

Dropbox Sign, the rebranded HelloSign, runs a dependable e-signature API with broad SDK coverage, but it leans on signature orchestration rather than native PDF fill intelligence. You upload templates and route them for signing, yet the API gives you no automatic field detection on a flat PDF the way Anvil's Document AI does. If your documents already carry form fields and your main job is collecting signatures, that gap rarely matters. The wall comes when you need to fill an unstructured PDF programmatically.

The API ships official SDKs for Python, Node, PHP, .NET, Ruby, and Java, with a published OpenAPI spec and a "Try it" console in the documentation (developers.hellosign.com). The API also exposes /llms.txt indexes and Markdown versions of every page for AI agents, which can be pulled into a code assistant. Field types cover signature blocks, text fields, checkboxes, dates, dropdowns, radio buttons, and signer attachments.

Pricing splits into three annual tiers. Essentials runs $75 a month for 50+ signature requests and 5 templates, Standard runs $250 a month for 100+ requests and 15 templates, and Premium moves to contact sales for unlimited templates, per the Dropbox Sign API pricing. The endpoint set scales with the tier. Essentials sends signature requests, Standard adds bulk send and embedded signing, and Premium unlocks embedded template creation and management.

That tier gating creates real friction, because embedded template creation through template/create_embedded_draft and template/update_files/{template_id} lives only on Premium, according to the Dropbox Sign developer docs. On Essentials and Standard, you can use templates built on the Dropbox Sign website but you cannot create them programmatically, so any team wanting a fully API-driven template pipeline has to jump to the top tier. Anvil places template setup and fill on its standard API surface without that restriction.

Rate limits sit at 100 requests per minute for standard endpoints and drop to 25 per minute for signature send, template, and file endpoints, with test mode capped at 10 per minute, as documented in the Dropbox Sign API reference. Free accounts can exercise every endpoint with test_mode=true, though documents come watermarked and carry no legal weight.

Best for: teams that need a reliable, well-documented e-signature API on pre-built fillable templates and don't need automatic field detection on flat PDFs.

How to Fill a Flat PDF with an API

A flat PDF carries no embedded form fields and is a static visual document. Text and lines render as page content with no machine-readable layer to write into. When you hit one for the first time, the usual approach breaks because there are no field objects to iterate over, so a standard fill library has nothing to target.

Developers who try to solve this with a raw vision model end up building a fragile pipeline. One documented OpenAI workflow renders each page as a high-resolution PNG, passes the image to GPT-4 Turbo to guess field labels and pixel positions, and overlays text at those coordinates. The same developer found that feeding raw PDF text to a retrieval model "led to very poor results" because extraction strips the spatial layout. The approach also loses cross-page context, so a section header on page 1 leaves fields on page 2 without a label, and the model misfills them.

Anvil's Document AI removes that work in a few steps.

  • Upload any PDF, including a flat one with no existing form fields.
  • Auto-detect runs Anvil's line and box detection to find field positions and tag them with coordinate placement.
  • Map your data as a JSON data object keyed by field IDs, with nested objects supported for things like name: { firstName, lastName }.
  • Fill by POSTing to the template endpoint, which returns the completed PDF as binary bytes.

You can test the upload and detection flow without a signup. Rather than stitch together a vision model, an image renderer, and an annotation layer yourself, you point Anvil at the flat PDF and let it handle field placement. Anvil is the easiest path for flat PDF filling.

How We Chose These PDF Filling APIs

We ranked these APIs on the criteria that decide real document automation projects, not feature checklists. API maturity came first. A tool needs documented REST endpoints, official SDKs across major languages, and webhooks for event-driven pipelines before it belongs in a developer's stack.

Flat PDF support carried heavy weight, because most government forms, tax documents, and legacy contracts arrive with no embedded form fields. A fill API that handles only pre-tagged PDFs solves only half the problem.

We checked whether each tool combines fill and e-signature in a single workflow, since 68% of mid-market buyers prefer that over stitching two vendors together, per Anvil's onboarding research.

Pricing transparency mattered next. Published per-call rates let you model costs at volume, and vague "contact sales" tiers do not.

Finally, we weighed compliance certifications like SOC 2 Type II, HIPAA, and eIDAS, alongside developer experience measured through docs quality, test modes, and SDK ergonomics.

FAQs

What is a PDF filling API and how does it work?

A PDF filling API accepts structured data and writes it into a PDF template, returning the completed document. With Anvil, you POST a JSON body keyed by field IDs to a REST endpoint, and the API returns the filled PDF as binary bytes. You skip manual data entry and generate documents directly from your application.

What's the difference between a fillable PDF and a flat PDF?

A fillable PDF contains embedded form fields that software can read and write programmatically, while a flat PDF is a static image of text and graphics with no machine-readable field layer. Most APIs can write to fillable PDFs out of the box but stumble on flat ones. Anvil's Document AI detects field positions on flat PDFs automatically, so both types work the same way.

Can a PDF fill API handle flat PDFs with no form fields?

Yes, but only if it can locate where data should go without existing field objects. Anvil uses line and box detection to place text by coordinates on flat PDFs, then exposes those positions as named fields you can map JSON to. Without that detection, you fall back to rendering pages as images and reading positions with a vision model.

How much does a PDF filling API cost?

Anvil charges $0.10 per fill as metered pay-as-you-go usage, and new accounts get 2,500 starter credits before billing begins, per Anvil's pricing page. At 1,000 fills a month, the metered cost is $100, plus the platform plan you choose. Bulk pre-purchase discounts unlock at 25,000 fills.

Which PDF filling API is best for HR onboarding?

Anvil fits HR onboarding because it combines fill, e-signature, and conditional logic in one workflow. Conditional rules build different packets by state, employment type, or department, so a full-time California hire and a Texas contractor receive the right forms automatically. Teams using this pipeline compress a two-week manual process to two days.

Which tool is best for high-volume batch PDF generation?

Anvil handles batch generation through a single API call that produces hundreds of personalized packets from one data source. The Product Pack and AI Pack plans support 40 requests per second, so the cost per fill stays predictable as your volume grows.

Do I need a separate API for e-signatures?

Not with Anvil, which combines fill, e-sign, and webform building blocks in one workflow. DocuSign and Dropbox Sign lead with signature orchestration but treat PDF filling as secondary, so pairing them often means stitching two services together.

Why Anvil Leads for Document Automation in 2026

No other tool here fills a flat PDF, signs it, and routes it through a workflow without a second vendor in the mix. DocuSign and Dropbox Sign handle signatures well but treat programmatic PDF filling as secondary. PandaDoc is built for sales proposals, not developer-driven fill pipelines.

Anvil's Document AI removes the manual coordinate-mapping step that every other tool leaves to you. The REST endpoint accepts a JSON body and returns filled PDF bytes, with official SDKs for JavaScript, Python, C#, and Java. Pricing is $0.10 per fill, with 2,500 starter credits and bulk discounts past 25,000 fills. SOC 2 Type II, HIPAA, GDPR, and eIDAS compliance round out the stack for HR, lending, and insurance teams. For document automation in 2026, Anvil is the most direct path from data to completed document.

Get a demo
(from a real person)

Schedule some time on our calendar to talk through your specific use case and see which Anvil products can help.
    Want to try Anvil first?
    Want to try Anvil first?