Skip to content

How to Add QR Codes to Merged PDFs

Embed dynamic QR codes into your merged PDFs using spreadsheet data. Generate unique QR codes for URLs, product IDs, tickets, and verification.

Adding Dynamic QR Codes to Merged PDFs

QR codes make your merged documents interactive — recipients can scan to open URLs, verify authenticity, or access personalized content. With Mergram, every merged PDF can contain a unique QR code generated from your spreadsheet data.

Prerequisites

To add QR codes to your merged PDFs, you need:

QR codes vs. barcodes

Mergram supports both QR codes (2D, scannable from any angle) and linear barcodes (Code 128, Code 39, EAN-13). This guide covers QR codes. The process for barcodes is identical — just select ‘Barcode’ as the render type instead of ‘QR Code’.

Use Cases for QR Codes in Merged PDFs

QR codes add interactivity and verification capabilities to printed and digital documents:

Use CaseQR Code ContentBenefit
Event ticketsCheck-in URL with ticket IDFast, contactless entry
InvoicesPayment page linkOne-scan payment
CertificatesOnline verification URLInstant authenticity check
Product labelsProduct page or manual linkCustomer self-service
Business cardsvCard or portfolio URLEasy contact saving
Marketing materialsLanding page or discount codeTrackable campaign links
Medical recordsPatient portal linkQuick access for patients
Shipping labelsTracking URLReal-time package status

Supported Data Types

Any text string from your spreadsheet becomes a scannable QR code. Common formats include:

Data TypeExample ValueQR Code Format
URLshttps://example.com/verify/12345Opens in browser
Emailmailto:contact@example.comOpens email client
Phonetel:+1234567890Initiates phone call
vCardBEGIN:VCARD\nVERSION:3.0\nFN:John...Adds to contacts
WiFiWIFI:T:WPA;S:MyNetwork;P:password;;Auto-connects to WiFi
Plain textAny custom stringDisplays as text

Dynamic URLs with merge fields

You can construct QR code URLs dynamically in your spreadsheet. For example, use a formula like ="https://example.com/verify/" & A2 to build unique verification URLs for each row.

Step-by-Step: Adding QR Codes

1. Prepare Your Spreadsheet

Add a dedicated column for QR code data. Each cell value becomes the content of one QR code:

NameEventTicketIDQRData
Alice ChenAnnual GalaTKT-001https://events.example.com/check/TKT-001
Bob MartinezAnnual GalaTKT-002https://events.example.com/check/TKT-002
Carol JohnsonAnnual GalaTKT-003https://events.example.com/check/TKT-003

2. Place the QR Code Field

In the Mergram editor:

  1. Select the QRData column from your data fields panel
  2. Change the render type from “Text” to “QR Code”
  3. A bounding box appears on the canvas — drag it to your desired position
  4. Resize the box to control the QR code dimensions — QR codes scale to cover the bounding box width, maintaining their square aspect ratio

3. Preview and Verify

Click Preview to see the QR code rendered with actual data from your first row. Scan it with your phone to verify the content is correct before running the full merge.

Tips for Scannable QR Codes

To ensure your QR codes work reliably in the real world:

Long URLs reduce scannability

QR codes encoding very long strings (over 300 characters) become denser and harder to scan at small sizes. Use URL shorteners or compact identifiers when possible. Shorter content = larger modules = easier scanning.

When to Use QR Codes

QR codes are the right choice when you need to:

Consider using plain text fields instead when the content is short enough to read at a glance (names, dates, amounts) and doesn’t need to be machine-readable.

Combining QR Codes with Other Features

QR codes work seamlessly with other Mergram features:

Common Issues and Troubleshooting

QR codes not scanning: Ensure the bounding box is large enough and the background has sufficient contrast. Try increasing the box size by 20–30% and test again.

Wrong content encoded: Double-check your spreadsheet column. The QR code encodes exactly what’s in the cell — extra spaces or line breaks will be included.

QR codes appear blurry in print: Ensure the bounding box is large enough for your print resolution. QR codes are rendered as high-resolution PNG images at the bounding box width. If the box is too small, the QR code may not have enough pixels for clean printing at high DPI. Increase the box size and re-merge.

Empty QR codes: If some rows have empty QR code data, those fields will be skipped. Fill in all cells in your QR data column, or filter out rows with missing values before merging.

Get Started

Upload a PDF template, add a QR code field, and see it rendered with real data in the Mergram editor. The free plan includes QR code generation — try it with a sample dataset today.

Step-by-step guide

  1. 1

    Add a QR Code Field

    In the editor, select a column from your spreadsheet and set the render type to 'QR Code'.

  2. 2

    Position on Canvas

    Drag the QR code field to the desired position on your PDF page. Resize the bounding box as needed.

  3. 3

    Preview

    Use the preview button to see the QR code rendered with actual data from your first row.

  4. 4

    Merge

    Generate merged PDFs — each one has a unique QR code from the corresponding spreadsheet row.

Frequently asked questions

What QR code data formats are supported?
Any text string works — URLs, email addresses, phone numbers, vCards, WiFi configurations, and plain text. The content comes directly from your spreadsheet column.
Can each PDF have a different QR code?
Yes! Each row in your spreadsheet produces a unique QR code. Use different URLs, IDs, or data for each row to create personalized scannable content.
What size are the QR codes?
QR codes scale to cover the width of the bounding box you draw on the canvas, maintaining their square aspect ratio. Resize the box width to control the QR code size. A minimum of 1cm × 1cm (about 40px at 72dpi) is recommended.
Can I also add barcodes to my merged PDFs?
Yes, Mergram supports both QR codes and linear barcodes (Code 128, Code 39, EAN-13). Set the render type to 'Barcode' instead of 'QR Code' when placing your field.
Are the QR codes high-resolution enough for printing?
Absolutely. QR codes are rendered as high-resolution PNG images scaled to the bounding box width. They remain crisp and scannable even when printed at high DPI. Use a sufficiently large bounding box (at least 2cm × 2cm) for the best results.

Ready to try it yourself?

Start merging PDFs in minutes — free account required, no credit card needed.

Related articles