Lee este artículo en español.
How to fill a PDF form automatically (without opening it in Acrobat every time)
You've got a PDF template with fields (a contract, an application form, a client sheet) and every time you need a copy with different data, the process is always the same: open it in Acrobat, type into each field by hand, save, repeat. If you're generating one copy per client, per order or per signup, that mechanical work eats your day.
It shows up mostly in cases like these:
- A contract you send to every new client with their name, ID and amount.
- An internal application or form filled in with each order's details.
- A supplier or employee sheet that's the same except for a handful of fields.
- A certificate or proof of something generated once per person.
In every one of these, the template never changes, only the data does. That's exactly what Fill PDF form does: you send it the template and the data, and it gives you back the filled PDF.
First, find out which fields the template has
If you didn't build the template yourself (or built it a while ago and don't remember the exact field names), you don't need to open it to check. Send the PDF without the data parameter (or with inspect=true) and the tool responds with fields: the full list of fields the form has, along with their type.
This inspection step is what gives you the exact names you'll use to fill the form afterward, so it's worth doing first with any new template.
Fill each copy with different data
Once you know the field names, send the PDF again, this time with a data object holding the values. Just including data (even an empty object {}) is enough to switch the tool into fill mode.
Not every field type gets filled the same way:
- text: any text.
- checkbox:
trueorfalse. - radio, dropdown and list: one of the values from
options(you'll see these in the inspection step). - button and signature: these can't be filled through the API. If the template has them, they're left as they are.
Input works two ways: the raw PDF template (application/pdf) with the data as URL-encoded JSON in the data parameter, or a JSON body with { file, data, flatten, inspect }.
Getting a field name wrong doesn't break the call
It's easy to typo a field name, especially on a template with dozens of them. If you send a field that doesn't exist in the PDF, the call doesn't fail: that gets flagged in a warnings array in the response (or in the X-Warnings header with the number of warnings, if you request the PDF in binary). That way you can check what didn't get filled without guessing and opening the file.
Which output format to use
By default the tool returns the filled PDF in binary, ready to save or attach. If you'd rather work with JSON (for example, to chain it into another step of a workflow), add output=json and you get { pdf, warnings, meta } back, with the PDF in base64.
Every call, whether inspecting or filling, costs 1 credit.
FAQ
Can I fill any PDF, even one I didn't create? Yes, as long as it has real form fields. A PDF with actual fields isn't the same as a PDF that just "looks" like a form because it has lines and boxes drawn on it. The inspection mode checks this in one call: if fields comes back empty, that PDF has nothing fillable through this method.
Do I have to send every field each time? No. Just the ones you want to fill or change. Anything you don't mention stays exactly as it was in the template.
Can I sign the PDF with this tool? No. Button and signature fields can't be filled through the API.
Try these tools
You'll find the full instructions for Fill PDF form, covering both modes and how to use them. And if you don't have an account yet, you can create one for free.