New Tool Radar

AI PDF

How to Check Every Link Annotation in a PDF for Dead URLs Before Publishing It

List every link in a PDF, open each target URL, and record which ones return errors before the file goes public.

Schematic with three steps: List every link annotation; Open each URL and record the result; Fix or remove the dead links.

A link annotation is a rectangular active area on a page that opens a web page when clicked. Links rot: pages move, domains lapse, and a published PDF can end up pointing readers at error pages. Checking every link before publishing catches the dead ones while you can still fix them.

What you need

  • A PDF with web links
  • Adobe Acrobat or another editor that lists link annotations
  • A way to open each target URL, such as a browser or curl

Step 1: List every link annotation

Open the PDF in Acrobat, use the link editing tool to select each link in turn, and copy its target URL into a list with its page number.

Step 2: Open each URL and record the result

Open every URL from the list and record the HTTP result or the page you land on. Mark any URL that returns an error, redirects to an unrelated page, or times out.

Step 3: Fix or remove the dead links

Replace each dead URL with the current address, or remove the link annotation if the target no longer exists, then re-check the fixed links.

Worked example: synthetic link check on a 20-page resource guide

The table below is a synthetic example. It shows the expected result of the link check; no check was run.

Page Link target Result
Page 3 example.org/guide 200, works
Page 7 example.org/old-report 404, page moved
Page 12 example.net/tool 200, works
Total 3 links 1 dead link to fix

Expected result (UNTESTED). two of the three links open correctly, while the link on page 7 returns a 404 and must be replaced before publishing. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A link that opens today can break tomorrow, so this check is only valid on the day it is run.
  • A URL that redirects to a different page is not necessarily dead, but the reader may not reach the intended content.
  • Links to pages behind a login cannot be verified without the right credentials.

Sources

See all