What Is PDF Mail Merge?
PDF mail merge fills a PDF template with data from a spreadsheet — generating one personalized document per row. It’s the same concept as Word mail merge, but for PDF files.
You upload a PDF template (or import a Canva design), connect a spreadsheet, and place dynamic fields on the document. Each row in your data produces a separate PDF with the corresponding values filled in.
One template + one spreadsheet = hundreds of personalized documents.
Why PDF Mail Merge Matters
Traditional mail merge has been around since the 1980s — but it was built for Word documents and printed letters. Modern businesses need the same power applied to PDFs, which are the standard format for invoices, contracts, certificates, and compliance documents.
PDF mail merge solves a specific problem: you have one template and hundreds (or thousands) of records, and you need a separate PDF for each record. Without a merge tool, you’d be opening each PDF manually, typing in data, and saving — a process that doesn’t scale past a few dozen documents.
Mergram automates this entirely. Upload your template once, connect your data, and let the platform generate all documents in one job. The result is consistent, accurate, and takes minutes instead of days.
New to mail merge?
Try the free demo at mergram.com/try — no sign-up required. Upload a sample PDF and spreadsheet, drag fields onto the page, and see merged output in seconds.
How It Works
Mergram provides a visual, browser-based editor where you drag data fields directly onto your PDF pages. No coding, no command-line tools, no desktop software to install.
Step 1 — Upload Your PDF Template
Upload any PDF file from your computer, or import a design directly from Canva. Your template defines the static layout — logos, headers, borders, typography, and any content that stays the same across all generated documents.
Accepted template sources:
- PDF files — Any PDF, including those created in Adobe Acrobat, Word, Google Docs, Canva, or InDesign
- Images — PNG or JPEG files are automatically converted to PDF
- Canva designs — Import directly via the Canva integration (authorized Canva app)
Design tip
Design your template in whichever tool you prefer — Canva, Figma, InDesign, Google Docs, or Word. Export as PDF, then upload to Mergram. Your design stays intact; only the fields you place get replaced with data.
Step 2 — Connect Your Data Source
Upload a spreadsheet file or connect a Google Sheet. Mergram reads the first row as column headers and treats each subsequent row as one record to merge. You can work with up to 100,000 rows in a single job.
Select from these data sources:
| Source | Formats | Connection | Max Rows |
|---|---|---|---|
| Excel | .xlsx, .xls, .ods | File upload | 100,000 |
| CSV | .csv, .tsv, semicolon-separated, tab-separated | File upload | 100,000 |
| Google Sheets | Live Google Sheets | Direct connection via OAuth | 100,000 |
| REST API | JSON payload | HTTP POST request | 100,000 |
For multi-sheet Excel workbooks, Mergram shows a sheet picker so you can select the right tab before merging.
Step 3 — Place Data Fields Visually
Drag column headers from the sidebar directly onto your PDF pages. Each field becomes a positioned box you can resize, align, and configure:
- Position — Drag to place anywhere on any page
- Resize — Drag corners or set exact dimensions
- Render type — Choose how each field renders (text, barcode, QR code, or image)
- Styling — Set font, size, color, alignment, and rotation per field
- Multi-page — Place fields on any page of a multi-page PDF
- Snap-to-center — Visual alignment guides help you center fields precisely
Quick start
If your PDF has fillable AcroForm fields, Mergram auto-detects them and suggests column mappings using fuzzy matching. You can review and adjust mappings before merging — no manual placement needed for form-based PDFs.
Step 4 — Preview & Generate
Use the row selector to preview any individual row in real time — rendered directly in your browser, no server round-trip needed. Check alignment, font sizes, and data formatting before committing to a full run.
When you’re satisfied, generate your documents:
- Individual PDFs — One file per row, packaged as a ZIP download
- Combined PDF — All pages concatenated into a single document
- Email delivery — Each PDF sent as a personalized email attachment via your SMTP server
Background workers process bulk jobs with real-time progress tracking — watch as each row is rendered, with pause and resume support for large batches.
Supported Data Sources
Microsoft Excel (.xlsx, .xls, .ods)
Upload any Excel file directly from your computer. Mergram supports all modern Excel formats:
- .xlsx — Standard Excel workbook (Office 2007+)
- .xls — Legacy Excel format (Office 97–2003)
- .ods — OpenDocument Spreadsheet (LibreOffice, Google Docs export)
Column headers are read from the first row. Data starts from row two. For multi-sheet workbooks, a sheet picker lets you select the correct tab.
CSV Files
Mergram handles CSV files with flexible delimiter support:
- Comma-separated — Standard CSV format
- Semicolon-separated — Common in European locales
- Tab-separated — .tsv files
Encoding
Mergram handles UTF-8 and Latin-1 encoded CSV files, so accented characters (é, ñ, ü) and non-Latin scripts (日本語, 한국어, Текст) display correctly.
Google Sheets
Connect a Google Sheet directly via OAuth — no file downloads required. Select any spreadsheet from your Google Drive and choose the worksheet tab.
Advantages over file upload:
- Always current — Pull the latest data on every merge
- No file management — No downloading and re-uploading updated spreadsheets
- Collaborative — Team members can update the source sheet in real time
- Auto-refresh — Re-merge with updated data without re-uploading
REST API (JSON)
For programmatic access, send JSON data directly via the API:
{
"templateId": "tpl_abc123",
"data": [
{"name": "Alice Chen", "amount": "$1,500.00", "due": "2025-02-15"},
{"name": "Bob Martinez", "amount": "$2,300.00", "due": "2025-02-15"}
]
}
This is ideal for integrations with CRM systems, webhooks, and automated pipelines.
Field Types
Every spreadsheet column can be rendered in multiple ways. Choose the best type for each field:
Text Fields
The default render type. Displays the cell value as styled text on the PDF.
- Names — Recipient names, company names, contact names
- Addresses — Street addresses, cities, postal codes, countries
- Amounts — Currency values, totals, subtotals, tax amounts
- Dates — Invoice dates, due dates, contract dates, event dates
- Free text — Any content that should appear as text on the document
Text fields support custom fonts (including uploaded .ttf, .otf, .woff, .woff2 files), configurable size, color, alignment, and full Unicode support — including CJK characters, Arabic, Cyrillic, and emoji.
QR Codes
Generate dynamic QR codes from spreadsheet values. Common uses:
- URLs — Payment links, landing pages, form links
- Verification links — Certificate authenticity, document validation
- Product IDs — Inventory tracking, asset management
- vCards — Contact information embedded as a scannable QR
- Event check-in — Unique codes for each attendee
QR codes are generated at high resolution and embedded as PNG images in the PDF.
Barcodes
Insert machine-readable barcodes for product labels, shipping, and inventory:
| Symbology | Best For | Example Data |
|---|---|---|
| Code 128 | General purpose, alphanumeric | INV-2025-0042 |
| EAN-13 | Retail products, ISBNs | 5901234123457 |
| UPC-A | US retail products | 012345678905 |
| Code 39 | Industrial, automotive | PART-9921 |
| ITF-14 | Shipping containers, cartons | 15400141288763 |
| Pharmacode | Pharmaceutical packaging | 117480 |
Image Fields
Dynamically insert photos, logos, and signatures from your team’s Media Albums. The spreadsheet cell contains the image filename, and Mergram resolves it to the corresponding uploaded image.
Use cases include:
- Employee photos — ID cards, badges, directories
- Product images — Catalog pages, price lists
- Signatures — Authorized signatures on contracts and letters
- Logos — Client or partner logos on branded documents
Images scale to cover the bounding box, maintaining aspect ratio, and are aligned to the top-left corner of the field bounding box. An optional margin can be applied for padding.
PDF Form Fields (Auto-Detected)
If your PDF has AcroForm fields (created in Adobe Acrobat, LibreOffice, or other PDF editors), Mergram detects them automatically and suggests column mappings using fuzzy matching:
ClientName↔Client Name↔client_nameEmailAddress↔Email↔email_addressInvoiceNumber↔Invoice No.↔invoice_number
Review and adjust all mappings before generating. No manual field placement needed for form-based PDFs. This is the fastest path when your template already has defined form fields.
Form mode vs. canvas mode
Canvas mode works with any PDF — you place fields freely. Form mode only works with PDFs that have fillable AcroForm fields. If Mergram detects form fields, you’ll see both options. Choose whichever fits your workflow.
Output Options
Combined PDF
All generated pages are concatenated into a single PDF file. This is useful when you need one downloadable document — for example, a full set of invoices to send to accounting, or all certificates in one printable file.
Individual PDFs
Each row produces a separate PDF file, packaged as a ZIP download. This is ideal when you need to distribute documents individually — email each person their own file, or upload to separate records in a CRM.
Custom Filenames
Use filename templates to name output files dynamically based on spreadsheet data. For example:
Invoice_[[InvoiceNumber]]_[[ClientName]].pdf→Invoice_0042_Alice_Chen.pdfCertificate_[[LastName]]_[[Course]].pdf→Certificate_Chen_Advanced_Excel.pdfContract_[[Company]]_[[Date]].pdf→Contract_Acme_Corp_2025-01-15.pdf
Filenames are automatically sanitized to remove characters that are invalid on Windows, macOS, and Linux.
Password Protection
Encrypt each generated PDF with a unique password derived from your spreadsheet data. Use templates like:
[[lastName]]-[[birthYear]]→Chen-1990[[employeeId]]→EMP-42178[[invoiceNumber]]_[[zipCode]]→INV-0042_90210
PDFs are encrypted with RC4 128-bit, compatible with all standard PDF readers (Adobe Acrobat, Preview, Chrome, Firefox).
Email Delivery
Skip the download step entirely — connect your SMTP server and send each PDF as a personalized email attachment. Supported SMTP providers include:
- Gmail — Free Gmail SMTP (up to 500 emails/day)
- SendGrid — High-volume transactional email
- Mailgun — Developer-friendly email API
- Amazon SES — Cost-effective at scale
- Any SMTP server — Custom configuration supported
Email body supports rich text (HTML), merge field placeholders (e.g., Dear [[Name]]), and per-recipient customization.
Email campaigns
Use Mergram’s email campaign feature to send thousands of personalized PDFs with progress tracking, per-recipient status, and retry support.
Use Cases
Invoices & Billing
Generate personalized invoices for every client. Include line items, tax calculations, payment terms, and QR codes for payment links. Mergram handles the tedious part — producing consistent, professional invoices for dozens or hundreds of clients in one operation.
- Freelancers — Monthly invoices for multiple clients with different rates and terms
- Agencies — Batch client invoices with project-specific line items
- E-commerce — Order confirmations, receipts, and packing slips
- Accounting firms — Bulk billing documents for end-of-month processing
→ See Invoice Template
Certificates & Diplomas
Create completion certificates, diplomas, and awards in bulk. Add custom calligraphy fonts, recipient photos, and verification QR codes that link to an online validation page.
- Universities — Graduation diplomas for entire graduating classes
- Online courses — MOOC completion certificates issued automatically
- Training companies — Professional development and compliance certificates
- Schools — Award certificates, honor roll, and achievement records
→ See Certificate Template
Contracts & Agreements
Fill contract templates with client data — NDAs, service agreements, employment contracts, lease agreements. Encrypt with per-recipient passwords so each party can only open their own document.
- NDAs — Non-disclosure agreements for multiple parties simultaneously
- Service contracts — Variable terms, pricing, and scope per client
- Employment — Offer letters and role-specific agreements at scale
- Real estate — Lease and purchase agreements with property-specific details
→ See Real Estate Use Case
Shipping Labels & Packing Slips
Print address labels, shipping stickers, and packing slips with barcodes for tracking. Generate one label per order directly from your order spreadsheet.
- Address labels — Bulk mailing and shipping labels
- Packing slips — Order summaries with item details and barcodes
- Return labels — Pre-printed return shipping labels
- Warehouse labels — Inventory and bin location tags
Event Tickets & Badges
Design and print personalized event tickets with unique QR codes for check-in. Support tiered ticket types — VIP, General, Early Bird — from a single template.
- Conferences — Attendee badges with QR check-in and session info
- Concerts — Tickets with seat numbers, section, and barcodes
- Workshops — Enrollment confirmations with dates and locations
- Sports events — Season passes and single-game tickets
→ See Event Ticket Template
HR & Onboarding Documents
Generate employee-specific onboarding packets — offer letters, benefits enrollment forms, policy acknowledgments, and tax forms — all personalized from an HR spreadsheet.
- Offer letters — Personalized compensation, start date, and role details
- Benefits enrollment — Per-employee benefits summaries
- Policy acknowledgments — Signed policy receipts for compliance
- ID cards — Employee badges with photos and QR codes
Healthcare Patient Forms
Fill patient intake forms, consent forms, and insurance documents with data from your practice management system. Export as CSV from your EHR, merge with PDF templates.
- Intake forms — Pre-filled patient demographics
- Consent forms — Procedure-specific consent documents
- Insurance claims — Standardized claim forms with patient data
- Prescription labels — Patient-specific medication labels with barcodes
Letters & Correspondence
Generate personalized formal letters — offer letters, thank-you letters, cover letters, and notification letters with custom letterhead.
- Offer letters — Employment, internship, promotion notifications
- Thank-you letters — Donor acknowledgments, client appreciation
- Notification letters — Policy changes, rate updates, renewal reminders
- Reference letters — Employment, academic, and character references
API & Automation
REST API Overview
Mergram’s REST API lets you trigger merges programmatically from any application. Authenticate with API keys, send template and data payloads, and receive download URLs for generated files.
Key capabilities:
- Merge endpoint — Trigger PDF generation with a template and JSON data
- Template management — List, create, and update templates via API
- Job tracking — Poll job status for progress and completion
- File download — Retrieve generated PDFs via signed download URLs
API Call Example
Here’s a real example — generating two personalized invoices from a stored template:
curl -X POST https://mergram.com/api/v1/merge \
-H "Authorization: Bearer mg_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_abc123",
"data": [
{
"name": "Alice Chen",
"company": "Acme Corp",
"amount": "$1,500.00",
"due_date": "February 15, 2025",
"invoice_number": "INV-0042"
},
{
"name": "Bob Martinez",
"company": "Globex Inc",
"amount": "$2,300.00",
"due_date": "February 15, 2025",
"invoice_number": "INV-0043"
}
],
"output": {
"mode": "individual",
"filename_template": "[[invoice_number]]_[[company]]"
}
}'
Response:
{
"jobId": "job_789xyz",
"status": "pending",
"itemCount": 2
}
Poll GET /api/v1/jobs/{jobId} for status.
→ See API Reference
Zapier Integration
Trigger merges from 2,000+ Zapier-connected apps without writing code:
- CRM events — Generate a contract when a deal moves to “Closed Won” in Salesforce or HubSpot
- Form submissions — Create a certificate when someone completes a Typeform or Google Form
- Payment events — Generate an invoice when Stripe processes a payment
- Scheduled triggers — Batch-generate reports on a weekly or monthly schedule
→ See Zapier Integration Guide
Make.com Integration
Build multi-step automation scenarios with Mergram’s Make.com connector:
- Multi-app workflows — Fetch data from Airtable, merge a PDF, upload to Google Drive, and notify via Slack — all in one scenario
- Conditional logic — Route different templates based on data values
- Batch processing — Process arrays of records from any Make-compatible source
- Error handling — Retry failed merges and route errors to monitoring
→ See Make.com Integration Guide
Polling
Jobs are processed asynchronously. Poll the status endpoint at intervals (every 2–5 seconds is recommended) until the status is completed or failed. See the API Reference for polling details.
Security & Privacy
Browser-Based Preview
Single-row previews run entirely in your browser — your PDF template and data never leave your machine during the preview phase. Only when you trigger a bulk merge does data get sent to Mergram’s servers for processing.
This means you can test field placement, alignment, and formatting with zero privacy risk. Sensitive data stays local until you decide to generate.
Server-Side Encryption
When you run a bulk merge, all data is transmitted over HTTPS/TLS 1.3 and stored with AES-256 encryption at rest. Generated PDFs are encrypted and accessible only via signed, time-limited download URLs.
PDF Password Protection
Each generated PDF can be encrypted with a unique password derived from your spreadsheet data. Uses RC4 128-bit encryption compatible with all standard PDF readers. Passwords are never stored — they’re generated on-the-fly from your template during the merge.
SMTP Credential Security
SMTP passwords are encrypted with AES-256-GCM before storage. They are decrypted only at the moment of sending and are never logged or exposed in API responses.
Enterprise Self-Hosted Option
For organizations with strict data residency or compliance requirements, Mergram offers a self-hosted Enterprise deployment:
- Runs entirely on your infrastructure (Docker, Kubernetes)
- No data ever leaves your network
- License key verified locally (no phone-home)
- Unlimited document generations
- Custom data retention policies
- Admin user management with email/password authentication
Data Retention
Generated documents are automatically purged based on configurable retention policies. In SaaS mode, files are deleted after the retention period. In Enterprise mode, you control the retention schedule entirely.
Compliance
Mergram’s security practices are designed to support GDPR, HIPAA, and SOC 2 requirements. For specific compliance questions, contact the security team.
Pricing
Free Tier
Every new user starts with free credits — enough to test all features end-to-end. Upload a real PDF template, connect a real spreadsheet, place fields, preview, and generate actual merged documents. No credit card required.
Try it free at mergram.com/new
Credit System (SaaS)
Mergram uses a credit-based pricing model. Each row of data consumes one credit, regardless of how many pages the output PDF has. This means:
- 50 invoices (1 page each) = 50 credits
- 100 contracts (3 pages each) = 100 credits
- 1,000 certificates (1 page each) = 1,000 credits
Plans include a monthly credit allocation:
| Plan | Monthly Credits | Best For |
|---|---|---|
| Starter | Moderate volume | Small teams, freelancers |
| Pro | Higher volume | Growing businesses, agencies |
| Max | Maximum capacity | Large organizations, high-volume operations |
Monthly subscription credits reset each billing cycle.
Enterprise — Unlimited
For organizations that need unlimited generations and full control:
- Unlimited credits — No monthly caps or per-page charges
- Self-hosted — Deploy on your own infrastructure
- Custom retention — Define your own data lifecycle policies
- Email/password auth — No Google OAuth dependency
- Priority support — Dedicated support channel
- License key — One-time or annual license, verified locally
→ See Billing & Credits for full plan details and Enterprise pricing.
Get Started
Try Mergram’s PDF mail merge editor free — free account required. Upload a PDF and spreadsheet, drag fields onto your template, and preview merged results instantly in your browser. No account? Try the light demo first — no sign-up required.
It takes under five minutes from upload to your first merged document.
What you need to get started:
- A PDF template — any PDF file (invoice, certificate, contract, label, etc.)
- A spreadsheet — Excel, CSV, or Google Sheet with your data
- A free Mergram account — sign up at mergram.com/new
What you don’t need:
- Desktop software or browser plugins
- Programming knowledge
- Design skills (though Canva makes it easy)
- A credit card