Anvil PDF Filling API

The easiest way to programmatically populate any PDF

#4 Product of the DayFebruary 06, 2020
Convert your PDFs into templates that can be populated via API. Post JSON data and the API will respond with a completed PDF document. Your data is never stored on Anvil, and our simple metered pricing means you only pay for the API requests you make.
Would you recommend this product?
14 Reviews5.0/5
Hey everyone! ๐Ÿ‘‹ I'm Ben, a co-founder at Anvil. When we started Anvil, one of the most challenging technical aspects was creating a service that output data onto PDFs. A centerpiece of our workflow offering is taking data entered by a user and correctly placing it onto PDFs. Building out our service, we quickly learned PDFs are very complicated. Even though they are ubiquitous, there wasn't great tooling out there to process PDFs programmatically. We've spent a year battle-hardening (ahem, forging?) our PDF service through constant use in our workflow product, and we are now making it available as an API. There are many businesses today using tech to disrupt legacy incumbents in industries that run on mountains of paperwork: finance, insurance, government, etc. With our PDF Filling API, you don't need to reinvent the wheel. Our goal is to save you time, money, and provide a great integration experience. Your feedback is welcome!
Looks great! Does it support a dynamic array of line items? Invoices may have many more items than what you showed on the demo (and span multiple pages.)
@nathanpalmer Thanks! It supports repeating the PDF as many times as you would like, but will not add line items and shift other items on the page. For example, say you have an invoice PDF that is one page allowing 10 line items and you want to display 20 line items. You can have it repeat the page 2 times and return a 2 page filled PDF. Check out how you specify `data` payload:, to repeat the page, you would specify `data` as an array instead of an object. e.g. `{ data: [{lineItemDesc: ['one', 'two'...]}, {lineItemDesc: ['eleven', 'twelve'...]}] }`. Does that make sense? This is undocumented as of right now, but we should definitely note it in the docs :).
@nathanpalmer @benogle if I have well understood you mean that if you need to generate two pages because lines will not fit one page, you need to pass twice the header-footer data plus the lines for page 1 and lines for page 2. That makes sense but how can my software understand that those lines will exceed the pdf page space? I mean, it will depend by the amount of characters on each line. Is this a calculation I have to do in advance, or you take care of spreading the exceeding content in page 2? Thanks, kudos!
@guidoarata Yeah, it will generate 2 pages that use the same template. It depends on how you are using the multiple lines. For PDFs like an invoice template, you are generating like 20 line items, you will know how that your PDF template supports 10 and can break them up into 20 / 10 payloads. If you are wrapping text onto multiple lines in the PDF, you can use a 'Boxes per line' type in the editor. Then you send it a string, and it will wrap for you. This is tough to describe in a comment. Email me at with some more context: your PDF template and what you want to accomplish, and I can probably better help.
@benogle Thanks for the response. In our case the header is shown only once, but the line items optionally flow to the next page (or multiple pages.) We don't repeat the header today though on subsequent pages.
No more having clients fill out paper forms!
@josephbenmartin That is the dream! :)
super cool stuff, congrats to @manggit and the team!
@manggit @anvishapai Thanks, we really appreciate it!
Easy to use easy to navigate quite helpful tool
@bella_vulis Happy to hear you find it useful :)