Testing document links before the documents exist

The failure this catches is boring and extremely common: forty links on a page, thirty-nine correct, one copy-pasted from the row above. A 200 response tells you nothing, because the wrong file also returns 200.

The trick

Give every placeholder a title that matches the link text. The document then announces which link produced it, so a duplicated href is visible the instant you open it rather than months later when a client notices.

A report listing becomes:

Open the third one and it says Annual Report 2026. If it says 2025, you have found your bug in about a second, with no tooling.

Three things worth doing

Use the reference line for the source row

Add sub= with an identifier from your data, such as/pdf/Annual+Report+2026.pdf?sub=row+id+4192. Now the document points back at the record that generated the link, which is the part you actually need when a CMS is building the list.

Check the download filename, not just the page

The title becomes the filename too, so the downloads bar fills withannual-report-2026.pdf rather than a row of identical names. Adddownload=1 to force the save dialog and confirm the whole path works, including any Content-Disposition handling of your own.

Vary the page count where layout depends on it

If a preview pane or a print stylesheet behaves differently for long documents, set pages to something realistic rather than testing everything against a single page.

Swapping in the real files later

Because every placeholder URL starts /pdf, finding them again is a single search across your templates or content. That is worth more than it sounds: the usual way placeholders survive to production is that nobody can remember what to grep for. A quick check for the string pdfplaceholder.com before release will find every one.

Should one slip through anyway, the file itself saysPLACEHOLDER PDF - not a real document on every page and prints the URL that generated it in the footer, so the mistake is obvious rather than embarrassing. Start from the builder on the home page.