How to make a QR code for a PDF
Can a QR code hold a PDF?
A QR code cannot hold a PDF. It stores a few hundred characters and a PDF is hundreds of thousands, so what the code actually holds is a link to a file hosted somewhere else. That makes this a hosting question wearing a QR costume, and every way it goes wrong is a hosting problem rather than a code problem.
Once that is clear the whole task reorders itself. The code takes a minute. Deciding where the file lives, and whether that address survives, is the part worth thinking about.
Where the file lives is the real decision
Whatever you encode has to still resolve the day somebody scans it, which may be a year after printing. Three common choices, with their actual failure modes.
Your own website. Best case. You control the address, it is short, and you can replace the file in place. If you have a site, put the PDF on it.
Google Drive, Dropbox, OneDrive. Workable and by far the most common. Two cautions: the addresses are long, which makes the symbol denser and harder to print small, and access depends on a sharing setting that a colleague can change months later without knowing it is load-bearing for printed material.
Whatever the design tool gave you. Worst case, and the one that produces the most complaints. A file hosted inside a design or presentation tool often sits behind a temporary or account-scoped address that was never meant to be printed on anything.
Long addresses make worse codes
This is the part nobody mentions and it decides whether the code is printable. A QR code is a grid, and every extra character adds modules. A cloud sharing address of 90 or 120 characters produces a much denser symbol than a short link of 30, and at a fixed printed size denser means each module is narrower.
Below roughly 0.4mm per module a phone camera starts to struggle. So a long address on a business card or a menu corner is not merely inelegant, it is the difference between a code that scans and one that does not. Our size calculator works from the real symbol version rather than a rule of thumb.
Updating the document without reprinting
This is the argument for not encoding the file address at all.
Documents get replaced. A menu changes with the season, a price list changes with the year, a form is superseded, a typo is found. When the file changes, most hosting gives the new version a new address, and a code encoding the old one is now pointing at a document you have withdrawn, or at nothing.
Encode a short link that redirects to the file instead. Replace the document, re-aim the redirect, and every code already printed follows within about a minute. This is the same argument as dynamic versus static, and PDFs are where it bites soonest, because documents are revised far more often than posters are reprinted.
It also fixes the sharing-setting problem. If access breaks, you repair the destination rather than the printed material.
When it works for you and not for them
Nearly always the file rather than the code. In rough order of how often we see it:
The link needs an account, so a stranger gets a sign-in screen rather than the document. The file is large and gives up on a slow mobile connection. The host serves it in a way that makes the phone try to save rather than display it. Or the sharing permission has quietly reverted.
The test that catches all four takes a minute: open the encoded address on a phone that has never seen the file, signed out, on mobile data rather than the office wifi. That is the condition the person holding your flyer is actually in.
Questions
The things people ask before they commit something to paper.
Can a QR code contain a PDF?
No. A QR code stores a few hundred characters at most, and a PDF is measured in hundreds of thousands. What a QR code holds is a link to a PDF that is hosted somewhere, so the real work is choosing where the file lives and making sure that address will still resolve in a year.
How do I make a QR code for a PDF for free?
Upload the PDF somewhere with a stable public address, copy that address, and encode it. The free part is easy and is not where this goes wrong. What costs money later is discovering that the address you encoded was temporary, because then the code is dead and the printing has already happened.
Can I use a Google Drive or Dropbox link?
You can, with two cautions. Those links are long, which makes the symbol denser and harder to print small, and they depend on a sharing setting that somebody can change without realising it points at printed material. If you use one, encode a short link that redirects to it, so the destination can be repaired without reprinting.
How do I update the PDF without reprinting the code?
Point the code at a redirect you control rather than at the file. When the document is replaced, change where the redirect aims. If the code encodes the file address directly, a new version means a new address, which means a new code and new printing for every menu, poster or handout already in circulation.
Why does my PDF QR code not work on some phones?
Usually the file, not the code. Large PDFs time out on slow connections, some viewers refuse files served without the right content type, and a link that requires signing in shows a login screen rather than the document. Test by opening the encoded address on a phone that has never seen it, on mobile data rather than office wifi.