ScreenshotNeo

BlogHow-to

How to Link to a Specific Page in a PDF by URL

Add #page=N to a PDF URL to open a specific page. Learn page numbering, named destinations, viewer behavior, testing, and troubleshooting.

By the ScreenshotNeo team1 October 20267 min read

Use this pattern: https://example.com/manual.pdf#page=4. Replace 4 with the physical PDF page number, counted from 1. Put the fragment after any existing query string, then test the finished link in the viewer and device your readers use.

Basic syntax

A PDF page link has three parts:

https://example.com/file.pdf#page=N
  • https://example.com/file.pdf is the direct, publicly reachable PDF URL.
  • #page= tells a compatible PDF viewer to navigate to a page.
  • N is the physical page position, starting at 1.

For page 4, write:

https://example.com/manual.pdf#page=4

The number is the PDF viewer’s physical page number. It may differ from the printed number on the document. For example, a report can show “1” on its first chapter page while the PDF viewer calls that page 7 because the file contains a cover, contents, and legal pages first.

  1. Copy the direct HTTP or HTTPS URL of the PDF file.
  2. Open the PDF and identify the physical page number shown by the viewer.
  3. Append #page= and that number.
  4. Paste the complete URL into a browser or document.
  5. Verify that it opens on the intended page in the destination environment.

When the PDF URL already has a query string

Place the fragment after the complete query string:

https://example.com/manual.pdf?download=1#page=4

A fragment must be last. This is wrong because the query parameter comes after the fragment:

https://example.com/manual.pdf#page=4?download=1

Physical page numbers versus printed page labels

PDF viewers navigate by the file’s physical page index. Printed labels can restart, use Roman numerals, or skip numbers. To avoid an off-by-one link:

  1. Open the PDF in the viewer your readers will use.
  2. Navigate to the intended content.
  3. Read the viewer’s page indicator, not only the footer printed inside the document.
  4. Use that viewer number in #page=N.

Chromium’s PDF viewer treats a positive page value as 1-based and converts it to its internal zero-based index. In practice, #page=1 means the first physical page.

A page number can become wrong when someone inserts or removes pages. If you control the PDF, create a named destination at the target section and link to it:

https://example.com/manual.pdf#installation

Named destinations identify a location rather than a fixed page position, so they are more durable when pagination changes. They require a PDF authoring tool that can create the destination and a viewer that supports it. RFC 3778 describes named destinations and page parameters as separate PDF-open parameters.

Method Best for Trade-off
#page=N A quick link to a stable published file Breaks or shifts if pages are inserted
#destination-name A section link in a PDF you maintain Must be created and supported by the viewer

Viewer and platform behavior

Adobe Acrobat in a browser

Adobe documents the #page=[page number] pattern for browser links in supported Chrome or Edge configurations with its Acrobat browser plug-in. The PDF must be reached over HTTP or HTTPS; a local drive path is not the same kind of web link.

PDF.js

PDF.js accepts fragment options such as page and nameddest. It can combine options with an ampersand:

#page=2&zoom=200

When using the PDF.js viewer URL, the PDF path is supplied through its file query parameter and must be URL encoded. The viewer also needs to be able to fetch the file from the configured server.

Chromium’s built-in viewer

Chromium parses positive page values as physical pages beginning at 1. If a link appears to be one page off, check whether the target viewer is displaying a cover or other front matter as page 1.

Mobile apps, cloud drives, and embedded viewers

Support varies. Some applications preserve the fragment and navigate; others rewrite the URL, download the file, or ignore the fragment. Google Drive share URLs and mobile PDF applications can add their own routing layer, so do not assume that a link that works in desktop Chrome will behave identically everywhere.

Complete examples

HTML

<a href="https://example.com/manual.pdf#page=4">Read the installation steps</a>

Markdown

[Read the installation steps](https://example.com/manual.pdf#page=4)

JavaScript

const pdfUrl = 'https://example.com/manual.pdf#page=4';
window.location.assign(pdfUrl);

Python URL construction

from urllib.parse import urlsplit, urlunsplit

pdf_url = 'https://example.com/manual.pdf?download=1'
parts = urlsplit(pdf_url)
page_url = urlunsplit((parts.scheme, parts.netloc, parts.path, parts.query, 'page=4'))
print(page_url)
# https://example.com/manual.pdf?download=1#page=4

For a fixed, known PDF URL, simple concatenation is also sufficient:

page_url = 'https://example.com/manual.pdf#page=4'

Or skip the browser setup

If you first need to create a PDF from a web page, ScreenshotNeo can capture it through one API request. The same capture can then be linked with #page=N after the PDF is hosted. See the ScreenshotNeo documentation for the available options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Before the capture, cookie and consent banners, newsletter popups, and chat widgets are removed. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

Testing checklist

  • Use a direct PDF URL, not a page that embeds or redirects to the PDF.
  • Confirm the URL is reachable by the intended readers without authentication.
  • Count the physical page in the viewer.
  • Put #page=N after every query parameter.
  • Test in the browser, PDF plug-in, mobile app, or embedded viewer you support.
  • Test after publishing if a CDN, redirect, download handler, or link shortener is involved.
  • If the PDF changes, recheck page links or switch to named destinations.

Troubleshooting

Symptom Likely cause Fix
It always opens on page 1 The viewer ignores fragments, or a redirect/download service removed it Open the direct PDF URL, inspect redirects, and test a viewer known to support page fragments
The link is one page off You used the printed label instead of the physical page number Count the cover and front matter as the viewer does
The URL does not load The file requires authentication or is not a direct HTTP/HTTPS resource Use an accessible URL and confirm the response returns a PDF
It works on desktop but not mobile The mobile app does not implement PDF fragments or rewrites the URL Test the app’s supported deep-link format or provide a visible page reference as a fallback
Named destination does nothing The destination was not embedded or the viewer lacks support Recreate the destination in the PDF and verify it in the target viewer; keep a page link as fallback
PDF.js shows an error The file parameter is not URL encoded or the viewer cannot fetch the file Encode the PDF URL, check server access and cross-origin policy, and try the direct file URL

Performance, reliability, and maintenance

Opening a page fragment is handled by the PDF viewer after the file is available. The fragment does not reduce download time: a large PDF may still need to download before the viewer can render page 4. For faster delivery, keep PDFs reasonably sized, serve them over HTTPS, enable byte-range requests on the server, and use a cacheable direct URL.

Page links are reliable when the file URL remains stable and the viewer supports the parameter. A renamed file, expired signed URL, authentication wall, redirect, or replaced PDF can break the experience. If you generate expiring URLs, generate the link close to use time and ensure the fragment is appended to the final URL.

There is no separate cost for the #page fragment itself. Any cost comes from hosting, delivery, PDF generation, or the capture service used to create the file. With ScreenshotNeo, only clean shots are billed; failed loads and cache hits are free according to the response billing headers.

FAQ

Does #page=4 count from zero or one?

Use one-based physical numbering: #page=1 is the first page.

Viewer support for local paths varies. Adobe’s documented web-link behavior applies to HTTP or HTTPS locations, so publish the PDF at an accessible URL when you need a dependable shared link.

Can I open a page and set a zoom level?

Some viewers support additional fragment parameters. PDF.js documents combinations such as #page=2&zoom=200, but other viewers may ignore the zoom portion.

Should I use a page number or a named destination?

Use a page number for a quick link to a stable file. Use a named destination when you control the PDF and expect pages to move during revisions.

No. PDF fragment support depends on the browser, plug-in, app, hosting service, and redirects. Test the actual destination environment.