Stamp a QR Code Onto Every Page of a PDF
Generates a QR code from a URL or any text with qrcodejs and places it on the pages you choose using pdf-lib — one operation for a whole document, without the file or the link going anywhere.
About the PDF QR Code Inserter
Type what the code should contain, pick a corner, set the size and say which pages should get it. The code is generated at 512 by 512 pixels, embedded as a PNG, and drawn onto every page you selected, inset 24 points from the edges. Leave the pages field empty and the whole document is stamped; type something like 1-3, 8 and only those pages are.
The size slider runs from 5 to 40 percent of the page width and starts at 14, which on A4 works out at roughly 83 points — about 29 millimetres square. That is comfortably above the size most phone cameras need for a short URL, while staying small enough to sit in a corner without competing with the content.
Key Features
- One code, every page: The page range field means a whole document can carry the code after a single run, rather than requiring a stamping pass per page.
- Selective pages when you want them: Ranges and individual numbers can be mixed, so a code can go on the cover and the back page only if that is what the design calls for.
- Four corner positions: Bottom right, bottom left, top right and top left, each with a 24-point inset from the page edge.
- Size from 5 to 40 percent: The default of 14 percent suits a corner placement; the upper end is there for posters and single-sheet flyers where the code is the point.
- Encodes text, not just links: Anything you type is encoded, so a code can carry a reference number, a plain instruction or contact details rather than only a URL.
- The destination stays private too: qrcodejs generates the code locally from code held on this domain, so neither the document nor the URL you are encoding is disclosed to a code-generation service that could log it.
How to Use the PDF QR Code Inserter
- Add the PDF you want to stamp.
- Enter the URL or text the code should contain.
- Choose a corner and set the size — 14 percent is a sensible starting point for a corner placement.
- Leave the pages field empty for every page, or list the pages and ranges you want.
- Press Insert QR Code and download the file, saved with -qr on the end.
How It Works
The code is produced by qrcodejs at medium error correction, which reserves roughly fifteen percent of the code's capacity for damage recovery. That is the right default for a code that will be printed cleanly on paper and read at close range. If your codes will be printed on something that gets creased, wet or partially covered, be aware that medium correction gives less tolerance than the highest setting would.
The generated code is embedded once and drawn onto each target page, so stamping two hundred pages costs almost nothing in file size — there is one image in the document, referenced repeatedly, rather than two hundred copies of it.
One thing to watch: the code is drawn on top of whatever is already in that corner. There is no collision detection, so if your layout already has a page number or a footer where the code is going, they will overlap. Check one page before committing to a long document.
When You Need It
A conference organiser prints a programme that will be out of date within hours of going to press, because sessions always move. Putting a code on every page pointing at the live schedule means anyone holding the paper version can reach the current one, and the programme carries speaker details and a venue plan that there is no reason to hand to a third-party stamping service.
A fundraiser preparing sponsorship forms adds a code linking to the donation page on every sheet, so a supporter who does not want to fill in a paper form can give in ten seconds instead. The forms collect names, addresses and gift aid declarations, which makes a locally processed document the sensible default rather than a nicety.