How to create a QR code for a PDF or a file
A file code is a link code with a stricter test: a PDF has to survive a phone that does not want to open downloads, a slow connection in a shop, and a permission setting that quietly says no. Most failures are not the code at all, they are hosting choices. This guide gets those right.
What the code holds
Just a URL, for example https://yourdomain.com/files/price-list-2026.pdf. The file lives on a server; the code carries its address. Embedding a PDF inside the code itself is possible in theory and a bad idea in practice: the file has to become plain text, the code becomes a dense black block, and anything longer than a page will not fit at all.
So the real work is choosing where the file lives and making sure that address opens for a stranger.
Host the file somewhere that behaves
- Your own website folder is the best option: a clean address like
/files/price-list.pdf, no login, no interstitial page, and you control how long it stays there. - Google Drive works if the file is shared as "anyone with the link". The share link opens a preview page with a download button, which is one extra tap but perfectly usable.
- Dropbox and similar services work, but check the link does not open a marketing page asking the visitor to install the app first.
- Anything with an expiring link is a trap: the code outlives the link, and six months later every printed copy is dead.
Test the address in a private browser window, logged out, on a phone. If the file downloads silently to a folder instead of showing, many people will assume nothing happened.
Make the code
- Upload the final file to the address you chose. Rename it before uploading if needed: spaces and capitals in a file name become an ugly, error-prone URL.
- Open that URL on a phone and confirm the document appears.
- Copy the URL and paste it into the document generator.
- Download the SVG for print and a PNG for email or a website.
- Scan the printed proof. Then scan it once more while the phone is on mobile data rather than office wifi.
File size and the phone reading it
Keep the PDF under about 5 MB if you can. A 30 MB brochure that looks fine on a laptop can take a minute on a weak mobile signal, and a minute is long enough for a customer to give up.
- Export for screen rather than print resolution when the file is meant to be read on a phone: 150 dpi images, not 600.
- Use real text, not scanned pages. Text PDFs are smaller, sharper at any zoom, and searchable.
- One document per code. A link to a folder of files forces a choice at the worst moment.
- Name the file in the caption, e.g. "Price list 2026 (PDF, 1.2 MB)", so the guest knows what will happen.
Where a file code earns its place
A trade counter handing out price lists, a clinic reception with registration forms, a showroom brochure, a restaurant wine list, a job advert with a role description, a rental listing with the floor plan. All of them replace a stack of paper with one printed sign.
Say what the scan gives, not "scan me". "Scan for the full price list" tells a customer whether it is worth the tap. And keep a small stack of printed copies for anyone who prefers paper — the point is to reduce printing, not to refuse it.
When a page beats a PDF
If the content changes, or if it is meant to be read on a phone rather than filed, build a normal web page instead. A page loads faster, reflows to the screen, can carry your phone number and a buy button, and you can edit it without reprinting anything.
A PDF is the right format when the layout itself matters: a signed contract, a certificate, a design-heavy brochure, a form someone must print and fill in. Otherwise a page is kinder to the reader.
Mistakes worth avoiding
- Copying the URL from the editor. A document editor's address often requires your login. Use the published or shared link instead.
- Sharing a Google Doc as "restricted". The owner sees it, the customer sees a request-access screen.
- Linking to last year's file. Check the file name and date before printing a thousand flyers.
- Assuming the code is wrong. Nine times out of ten the code is fine and the file's permissions are not.
- Forgetting the file will move. If you reorganise the site, the old path breaks. Keep redirects, or leave the file where it is.
Frequently asked questions
Can the code contain the PDF itself?
Technically yes for very small files, but the code becomes a dense block that is hard to scan and impossible to print small. A link to the file is better in every practical case.
Why does the file open on my laptop but not on a customer's phone?
Almost always permissions or a desktop-only viewer. Test the exact URL in a private window on a phone, logged out, before printing.
Will the code stop working if I move the file?
Yes. Point the code at an address you can keep alive — a stable path on your own domain, or a redirect you control.
Read next: Payment QR code: free ways to get paid with one scan — Take payment from a scan, without ever handling card numbers.