How-to guides
How to add a QR code to a PDF
The clean route is placing the code in the source document (Word, InDesign, Google Docs), before exporting, as SVG so it stays vector inside the PDF. Failing that, insert the image with a PDF editor, or regenerate the document. Zoom to 800% afterwards: crisp edges mean vector, fuzzy means rasterised.
1. Pick your route
| Situation | Route |
|---|---|
| You control the source document | Place the code before export, the clean path |
| Finished PDF, no source available | Insert with a PDF editor |
| PDF is generated by software | Regenerate with the code in the template |
2. Route A: place in the source, then export
Add the code to the Word, Google Docs, InDesign or design file and export to PDF as usual. Use the SVG download where the tool accepts it (Word does, InDesign and Illustrator do), a vector placed in the source stays vector inside the exported PDF, which means it prints perfectly at any size and survives any zoom. Where only bitmaps are accepted (Google Docs), insert a PNG at 300 DPI for the final printed size.
Size and placement follow the usual print rules, at least 2 cm for a handheld page, one tenth of the scanning distance otherwise, with a quiet zone of 4+ modules kept clear of borders and text.
3. Route B: edit the finished PDF
Every serious PDF editor (Acrobat, PDF Expert, LibreOffice Draw, the better online editors) can stamp an image onto a page:
- Download the code as PNG at 300 DPI of its final printed size (many editors rasterise placed SVGs anyway, so control the resolution yourself).
- Insert the image, position it, and type exact dimensions if the editor allows rather than dragging.
- Save as a new file and inspect (next section).
Free-tier caveat: some online PDF editors recompress every image on save: compression is a code-killer. If the saved file's code looks softer than what you inserted, use a different editor.
4. The 800% zoom test
Open the final PDF and zoom to 800% on the code:
- Edges still razor sharp → the code is vector (or a comfortably high-res bitmap).
- Edges fuzzy or stair-stepped → it was rasterised at too low a resolution somewhere, usually export settings ("reduce file size", "optimise for web") or an editor's compression. Re-export with images at 300 DPI+, or place a bigger PNG.
Two traps specific to PDF pipelines: transparency flattening can silently rasterise vector codes that overlap transparent objects (keep the code clear of drop shadows and soft masks), and aggressive "optimise PDF" presets downsample images to 150 DPI or below.
5. Verify the actual file
Scan the code from the PDF on screen (that works fine), and if the PDF will be printed, print one page at 100%, not "fit to printer margins", which rescales and can clip codes, and scan the paper. The validator accepts a screenshot or export of the page and confirms the payload decodes exactly.
Gotchas
- "Reduce file size" after the fact undoes your careful resolution. Compress text and fonts, not images, or skip it.
- Codes near the page edge fall into printer margins on borderless-incapable printers. Keep the code inside the safe area.
- Password-protected or signed PDFs cannot be edited without invalidating the signature, place the code before signing.
- A QR code in a PDF is still static. It encodes its destination permanently, which is exactly what you want for a document that will be archived. See do QR codes expire.
Generate the code to place: make a QR code and download SVG for the source document, PNG for a PDF editor.
FAQ
How do I insert a QR code into an existing PDF?
Open the PDF in an editor that can place images (Acrobat, LibreOffice Draw and others) insert a 300 DPI PNG of the code, size it to at least 2 cm, and save. Then zoom in to check sharpness and scan it.
Will the QR code stay sharp inside the PDF?
Yes if it went in as vector (SVG placed in the source document) or as a sufficiently large bitmap. Zoom to 800%: crisp edges mean you are fine; fuzz means re-export at higher image quality.
Can I add a QR code to a PDF for free?
Yes: generate the code free at UseQR and place it with any free PDF editor, or add it to the source document and re-export. Avoid free online editors that recompress images on save.
Why does my PDF's QR code not scan after printing?
Usually downsampling ("reduce file size" exports), printing at "fit to page" which shrinks it below minimum size, or the code sitting too close to the trimmed edge. Print at 100% and re-test.
Try it: free, no signup
Related
- How to make a QR code as an SVG, Choose SVG at download or add format=svg to the API URL. A vector QR code scales to any size with perfectly sharp modules and weighs a few kilobytes.
- How to make a QR code for print, Download SVG (or 300 DPI PNG at final size), size it by scanning distance, keep a 4-module quiet zone, print modules in 100% K, and proof at real size.
- QR code cut off in a PDF, Artboard clipping, masks and transparency flattening can all break QR codes in PDFs. The 400% zoom check, and export settings that keep vectors intact.
- How to make a QR code in Word, Insert the PNG or SVG, set the exact size in cm via the Layout dialog, and use square text wrapping. For many codes, mail merge with an IncludePicture field.
- What size should a QR code be?, Printed width should be at least the scanning distance divided by ten. A code read from 30 cm needs 3 cm; from 2 m, 20 cm; from 10 m, 1 m. If there is not…