Mail merge with PDF attachment produces one personalized PDF per row of a data source, then combines every one of those PDFs into a single file using a browser-based PDF merger that runs entirely on your own device. The mail merge half of the workflow fills a PDF template (such as a contract, certificate, invoice, or letter) with values pulled from a CSV or spreadsheet, and writes a separate PDF for each recipient — for example, one offer letter per candidate or one invoice per customer. The PDF merge half of the workflow stitches those individual files into one combined document so it can be attached to a single email, dropped into a shared drive, sent to a print shop, or archived as the definitive record of the run. Doing the merge in your browser keeps every file on your own machine, which matters when the content is contracts, invoices, tax paperwork, or any other sensitive data you would not want sitting on a stranger's server.

how to use mail merge with pdf attachment
how to use mail merge with pdf attachment

What "Mail Merge With PDF Attachment" Actually Means

Mail merge started as a way to personalize printed letters: one template, one spreadsheet of names and addresses, hundreds of unique envelopes. The PDF version keeps the same shape but swaps the printed letter for a portable document. You point your mail merge tool at a PDF template (often a contract, certificate, form, or letter) and at a data file (usually a CSV or spreadsheet with one row per recipient). The tool fills the template fields with each row of data and saves the result as a separate PDF file per recipient.

Once those PDFs exist, the "with PDF attachment" part comes in. There are two common patterns:

  • One email per recipient, one PDF attached. A bulk email tool sends a personalized email to every row in the data file and attaches the matching PDF. The PDFs themselves stay separate.
  • One combined package. A single batch — for example, a binder of contracts, a print run of certificates, or a per-department packet — needs every per-recipient PDF stitched into one file for review, archiving, or sending to a single destination.

Both patterns start with the same per-recipient PDFs. The difference is whether you keep them apart or fold them together. This article is about the second pattern, where the dozens of individual mail merge PDFs become one document.

Where a PDF Merge Fits in a Mail Merge Workflow

A typical mail-merge-with-PDF pipeline has four stages: a template, a data source, a generator, and a downstream consumer. The merge tool sits at the end, between the generator and the consumer.

  1. Template: a PDF with named fields (or fixed positions the generator can fill) that defines the layout of every personalized document.
  2. Data source: a CSV or spreadsheet where each row holds the variables for one recipient — name, address, ID number, custom message, and so on.
  3. Generator: the script, add-in, or service that walks the data source and produces one PDF per row. Popular options include Word's mail merge to PDF, Outlook and Gmail add-ins, dedicated online services, and small Python scripts.
  4. Consumer: wherever the finished PDFs need to go — a single email blast, a shared drive, a print run, an archive, or a regulatory filing.

If the consumer needs a single file rather than dozens, the merge step collapses the generator's output into one document. Doing that merge locally in your browser keeps the data on the same machine that already holds the template, the CSV, and the generator output, which matters when the content is confidential.

The mail merge generator decides the naming and order of the individual PDFs, but the merge tool decides the order of the final bundle. Most generators number the output files sequentially, and most merge tools let you keep that order or rearrange it before downloading.

Combine Your Mail Merge PDFs in Your Browser

Merge PDF is a browser tool that takes any number of PDF files and combines them into a single document on your own device. There is no upload step, no account, and no server round-trip, so the PDFs your mail merge generated stay on your machine from the moment you made them until the moment you download the combined file.

To combine the PDFs produced by your mail merge into one attachment-ready document:

  1. Click Browse PDFs and select every PDF your mail merge generated, or drag the files from your file manager onto the page. One row in your data source should correspond to one file in the list, and adding them all at once is faster than merging in batches.
  2. Reorder the files with the up and down arrows until the sequence matches the order you want in the finished document. Remove any file you do not need with a single click. The list shows each file's name and page count, and a running total at the bottom tells you how many pages the merged PDF will contain before you download it.
  3. Download the merged PDF from the result link. The merge runs entirely inside your browser using the open-source pdf-lib library, and every page is copied from the source file rather than re-rendered, so text stays selectable and images keep their original quality.

The tool only produces an output once at least two valid PDFs are in the list, because merging a single file has nothing to combine. Once the combined PDF is downloaded, the per-recipient files can be kept for auditing, archived alongside the data source, or deleted depending on your workflow.

Why a Local Merge Protects Sensitive Mail Merge Data

Mail merge data is often the most sensitive material on a desk. Employee offer letters include salary, start date, and home address. Customer invoices include billing details. Medical and insurance paperwork includes identifiers and diagnoses. Contracts include signatures and counterparty information. Sending those PDFs to a remote service to be merged adds an unnecessary copy of every one of those documents to a server you do not control.

Running the merge locally sidesteps that step. The files are read into memory on your own device, every page is copied into a fresh output document, and the result is offered back to you as a download link. Nothing you touch ever leaves your computer, which makes a local merge safe to use with contracts, invoices, tax paperwork, medical forms, and any other content you would not want sitting on a stranger's server.

Because the merge runs in JavaScript inside your browser tab, it also works offline once the page has loaded. That is useful on locked-down networks where outbound uploads are blocked, audited, or simply too slow, and it means the same workflow works on a plane, in a meeting room, or on a workstation that does not have direct internet access during the merge.

Limits and Edge Cases to Plan Around

The browser merge handles everyday mail merge output without any setup, but a few scenarios need a little planning. The table below summarizes the common cases and what to do about each one.

Scenario What the tool does What you need to do
All mail merge PDFs are unprotected Combines every file into one document, in the order you set Nothing extra
One or more PDFs are password-protected Skips the locked files and flags them in the result Remove the password in the app that created the file, then add the unprotected copy and merge again
Dozens of files, hundreds of pages Combines normally while files fit in memory Split very large batches into smaller merges if you hit memory limits, then combine the results
Final order differs from the generator's order Reorders as you arrange the rows Use the up and down arrows before downloading
A single PDF in the list Will not produce an output Add a second PDF, or skip the merge if you only have one file

Password-protected PDFs are the one case the tool cannot handle directly. The underlying library refuses to read the pages of an encrypted file, and the tool deliberately skips it rather than risk a silently corrupted result. If a mail merge generator outputs protected PDFs — which can happen with certain add-ins or form templates — unlock each file in the application that created it before adding it to the merge list.

There is no hard page or file-count limit imposed by the tool itself. The only ceiling is your device's available memory, since every PDF is held in RAM while it is merged. Most laptops handle dozens of files and hundreds of pages with ease. For very large batches, splitting the work into a few smaller merges and then combining those results is more reliable than trying to push everything through in one pass.

Putting the Workflow Together

The cleanest mail-merge-with-PDF-attachment workflow keeps every stage on a single machine: a local template, a local data source, a generator that writes per-recipient PDFs to a folder, and a local merge that folds those PDFs into one file at the end. There are no uploads between stages, no cloud account to trust, and no queue to wait in.

Once the combined PDF is ready, it can be attached to a single announcement email, dropped into a shared drive for review, sent to a print shop, or archived as the definitive record of the mail merge run. The same set of source PDFs is still available on disk if you ever need to redo the merge in a different order or split the result back into individual files.

For readers who want a deeper walk-through of the privacy-first version of this workflow, the guide How to Mail Merge PDF Files Without Uploading covers the template and data-source side of the same pipeline.