PDF QR Code: How to Add, Generate & Scan QR Codes in PDFs
Learn how to add QR codes to PDF documents, generate PDF files from QR code data, and scan QR codes embedded in PDFs. Free tools and step-by-step instructions.
QR codes in PDF documents bridge the gap between print and digital. Add a QR code to a flyer, and someone can scan it to open your website. Put one on an invoice, and clients can scan to pay. This guide covers everything you need to know about creating, adding, and scanning QR codes in PDF files.
Why Put QR Codes in PDFs?
- Marketing materials: Brochures, flyers, and business cards with QR codes let people instantly visit your website or landing page
- Event tickets: PDF tickets with unique QR codes enable fast check-in at events
- Invoices and receipts: QR-encoded payment details let customers pay with a single scan
- Product manuals: Link to video tutorials, updated documentation, or support pages
- WiFi access: Embed WiFi credentials in a QR code on a PDF poster for easy guest access
- Menus and catalogs: Restaurant menus with QR codes linking to online ordering
How to Add a QR Code to a PDF
Method 1: Generate QR Code as Image, Then Insert
The simplest approach works with any PDF editor:
- Generate your QR code using a free tool like QR Code Generator (qr-code-generator.com) or goqr.me
- Download the QR code as a PNG or SVG image
- Open your PDF in any editor (Adobe Acrobat, PDFescape, Sejda, or LibreOffice Draw)
- Insert the image at the desired location
- Resize and position the QR code
- Save the PDF
Method 2: Use Canva for Design-Heavy PDFs
If you are creating a visually designed PDF (brochure, flyer, poster), Canva has a built-in QR code generator:
- Create your design in Canva
- Go to Apps and search for "QR Code"
- Enter your URL or text
- Place the generated QR code in your design
- Download as PDF for print or PDF for web
Method 3: Programmatic Generation
For bulk PDF generation (tickets, certificates, invoices), use a library to generate QR codes programmatically. Popular options include:
- Python: qrcode library + reportlab or FPDF for PDF generation
- JavaScript/Node.js: qrcode package + pdfkit or jsPDF
- PHP: phpqrcode + FPDF or TCPDF
This approach lets you generate hundreds or thousands of unique QR codes, each linking to a different URL or containing different data, all embedded into individual PDFs automatically.
Best Practices for QR Codes in PDFs
- Size matters: QR codes should be at least 2cm x 2cm (about 0.8 inches) when printed. Larger is better for easy scanning.
- High contrast: Black QR code on white background scans most reliably. Avoid colored QR codes for critical applications.
- Include a quiet zone: Leave white space around the QR code equal to at least 4 modules (the small squares that make up the code).
- Test before printing: Always scan your QR code from the final PDF before distributing it.
- Use short URLs: Shorter encoded text creates simpler QR codes that scan more reliably. Use a URL shortener if linking to long URLs.
- Consider error correction: QR codes support error correction levels L, M, Q, H. Use level Q or H if the code might be partially obscured or damaged.
How to Scan QR Codes from PDFs
On Screen
- Phone camera: Most smartphones can scan QR codes directly from the screen. Open your camera app and point it at the QR code on your screen.
- Online QR readers: Upload the PDF screenshot to an online QR code reader like webqr.com
- Browser extensions: Some Chrome extensions can read QR codes from web pages and PDFs displayed in the browser
From Printed PDFs
Standard phone camera scanning works perfectly for printed PDFs. For batch scanning (events, ticketing), use a dedicated QR scanner app or a handheld scanner connected to your check-in system.
Dynamic vs Static QR Codes in PDFs
Static QR codes encode fixed data. Once generated, the content cannot change. Free QR generators create static codes.
Dynamic QR codes encode a redirect URL. You can change the destination after the code is printed. This is useful for marketing campaigns where you might want to update the landing page. Dynamic QR services typically charge a subscription fee.
For most PDF use cases, static QR codes are sufficient. Use dynamic codes when you need to track scans or update destinations after distribution.