---
title: "Automate PDF Form Filling: A Free Script Guide"
description: "Speed up tedious PDF form filling with our free automation script. Make PDF handling a breeze."
canonical: "https://adamtheautomator.com/pdf-form-filler/"
---

# Automate PDF Form Filling: A Free Script Guide

> Speed up tedious PDF form filling with our free automation script. Make PDF handling a breeze.

Source: https://adamtheautomator.com/pdf-form-filler/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Automate PDF Form Filling: A Free Script Guide](https://adamtheautomator.com/wp-content/uploads/2019/06/5d238ae5c824b514689ea573.jpg)

# Automate PDF Form Filling: A Free Script Guide

[![](https://secure.gravatar.com/avatar/d0b9d42e21e5622713f8b693aa5c0f9244d5f7dd200ed29b8398f52dee5de337?s=192&d=mm&r=g)Adam Bertram](https://adamtheautomator.com/author/adam-bertram/)28 June 20192 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[PowerShell](/tag/powershell/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Editing PDF Forms with a PowerShell Module](#editing-pdf-forms-with-a-powershell-module)
*   [Downloading and Installing the PDF Tool](#downloading-and-installing-the-pdf-tool)
*   [Finding the PDF Field Names](#finding-the-pdf-field-names)
*   [Filing in PDF Form Fields](#filing-in-pdf-form-fields)
*   [Summary](#summary)

Acrobat PDF files are one of those formats that are notoriously hard to automate. But, using a free script, you create a handy PDF form filler that you’ll learn about in this article!

If you’ve ever had to edit PDF form and fill out fields by hand, it can soon turn into a real pain. A PDF file isn’t plain text and requires specific software to read (and edit) them.

One way to fill out PDF form fields in an automated script is to use the .NET Framework. But to do so requires you to be a software developer. Luckily, there’s a .NET library called iTextSharp to help.

## Prerequisites

For the instructions you’ll be receiving in this article to work, ensure you have:

*   A current Windows PC (Windows 7 or Windows 10 will work)
*   A beginner understanding of using the [PowerShell](https://adamtheautomator.com/tag/powershell/) scripting language
*   A PDF field with fields to fill

## Editing PDF Forms with a PowerShell Module

Since filling out PDF forms is not an easy task for non-programmers, I’ve created a PowerShell module called [_PDFForm_](https://github.com/adbertram/Random-PowerShell-Work/blob/master/Random%20Stuff/PdfForm.psm1). This module use the .NET library under the covers and makes working with it much easier.

> _If you don’t know how to import a module, check out [this guide](https://activedirectorypro.com/install-powershell-modules/)._

## Downloading and Installing the PDF Tool

The first step is getting the PDFForm module on your computer. To do that:

1.  Copy the entire contents of the [PDFForm PowerShell module](https://raw.githubusercontent.com/adbertram/Random-PowerShell-Work/master/Random%20Stuff/PdfForm.psm1), save it to a text file and call the text file _PDFForm.psm1._
2.  Create a folder called PDFForm in the _C:\\Program Files\\Windows PowerShell\\Modules_ folder.
3.  Move the _PDFForm.psm1_ file to the PDFForm folder just created.

At this point, the [PowerShell module](https://adamtheautomator.com/powershell-modules/ "PowerShell module") should be available in your PowerShell console. To verify, open PowerShell and run `Import-Module -Name PDFForm`. You should get no errors. If you do receive errors, something is amiss.

## Finding the PDF Field Names

Once you’ve got the _PDFForm_ module imported and a PDF file containing fields ready, you need to know the field names. To find these field names, run the `Get-PdfFieldName` function. Provide the path to the PDF file and the path to the iTextSharp DLL file as shown below.

```powershell
Get-PdfFieldNames -FilePath "C:\Vendor-Setup-Form.pdf" -ITextLibraryPath 'C:\users\Adam\dir\itextsharp.dll'
```

![PDF field names](https://adamtheautomator.com/content/images/2019/08/image.png)

PDF field names

> _The path to the iTextLibrary DLL isn’t necessarily required, but you will need to use this if the auto-download of iTextLibrary does not work within the PDFForm module._

## Filing in PDF Form Fields

You can see above that the PDF form example has quite a few fields available. Let’s now fill in a couple of them. Do this by using the `Save-PdfField` function. Specify the following parameters:

*   `Field` – This is a hashtable of each field name and value.
*   `InputPdfFilePath` – This is a file path that points to the PDF file
*   `OutputPdfFilePath` – This designates where to create the filled-form PDF

```powershell
$parameters = @{
    Fields = @{'Name' = 'test123';'Bank Name' = 'some bank'}
    InputPdfFilePath = "C:\Vendor-Setup-Form.pdf"
    ITextSharpLibrary = 'C:\users\adam\dir\itextsharp.dll'
    OutputPdfFilePath = 'C:\Users\Adam\test4.pdf'
}
PS> Save-PdfField @parameters
```

Now pull up the PDF file saved to `OutputPdfFilePath` and you should see our PDF form filler has populated all fields in the new PDF.

> _Some PDF files contain fields other than text boxes which PDFForm supports. Unfortunately, other fields are not supported at this time. However, PDFForm is open source so if you extend its functionality, please contribute to the project and submit a pull request on Github to make it better for everyone!_

Review the new PDF and check to see if it populated all of the fields you require. At that point, if the original PDF is no longer needed it can be deleted manually.

## Summary

Use the PDFForm module next time you need to fill out a bunch of web forms. It will not only save you time but will prevent the most common cause of problems in the IT world; human error.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fpdf-form-filler%2F&text=Automate%20PDF%20Form%20Filling%3A%20A%20Free%20Script%20Guide)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fpdf-form-filler%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fpdf-form-filler%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/06/26995-troubleshoot-dns-issues-powershell-codex.webp)

### [Troubleshoot DNS Issues with PowerShell](/troubleshoot-dns-issues-powershell/)

Troubleshoot DNS issues with PowerShell by testing name resolution, DNS client settings, cache entries, and network connectivity in a repeatable workflow.

![](https://adamtheautomator.com/wp-content/uploads/2025/10/image_2025-10-24_095322075.png)

### [Migrating from PowerShell 6 to 7.5: Breaking Changes/New Features](/migrating-powershell-6-to-7-5/)

Migrate from PowerShell Core 6 to 7.5: breaking changes, features, and testing tips.

![](https://adamtheautomator.com/wp-content/uploads/2025/06/featured-image-6.png)

### [How to Add Timeouts to Pester Tests with PowerShell Runspaces](/pester-test-timeout-runspaces/)

Prevent Pester tests from hanging indefinitely using PowerShell runspaces. Learn to handle variable scoping, module loading, TestDrive access, and stream capture challenges with timeout protection.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
