Anvil Document SDK is live on Product Hunt. We'd love your support!Vote for Anvil.
Anvil Logo
Products
Industries
Resources
Developers

Fill PDFs with C# & .NET

A simple API for filling out PDFs from your app. Set up a PDF template and use C# & .NET to pass data into the form.
Hero Image

Write C# & .NET, receive PDF

Have existing PDF forms? Simply upload them to Anvil to create templates. With our RESTful endpoint, you'll be ready to receive data over API and fill your PDF.

It’s that simple. Take your structured data, develop against it with C# & .NET, make the request, and save the response.

class FillPDF: RunnableBaseExample {
  private Anvil.Payloads.Request.FillPdf GetFillData() {
    return new Anvil.Payloads.Request.FillPdf {
      Title = "My PDF Title",
        FontSize = 10,
        TextColor = "#333333",
        Data = new Dictionary < string, dynamic > () {
          { "shortText", "HELLOOW"},
          { "date", "2022-07-08" },
          { "name", new Dictionary < string, object > () {
              { "firstName", "Robin" },
              { "mi", "W" },
              { "lastName", "Smith" }
            }
          },
          { "email", "testy@example.com" }
        }
    };
  }

  public override async Task Run(string apiKey) {
    var pdfTemplateEid = "f9eQzbUgCCRVDrd4gt8b";

    var payload = GetFillData();
    var client = new RestClient(apiKey);

    var wasWritten = await client.FillPdf(pdfTemplateEid, payload, "./output/fill-output.pdf");
  }
}
  

Try it now


SOC2 logo
GDPR logo
HIPAA logo
EIDAS logo

Sign up for a live demo

Request a 30-minute live demo today and we'll get in touch shortly. During the meeting our Sales team will help you find the right solution, including:
  • Simplifying data gathering
  • Streamlining document preparation
  • Requesting e-signatures
  • Building and scaling your business
Want to try Anvil first?Sign up for free
Want to try Anvil first?Sign up for free