---
title: "PDF.js viewer URLs: file, page and zoom - WebTolk websites development, Joomla Extensions"
description: "The query is ?file=...&config=catalog.json ; the fragment is #page=2&zoom=150 . Encode the complete file value through rawurlencode() , http_build_query()…"
url: "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/viewer-url"
date: "2026-10-09T19:22:04+00:00"
language: "en-GB"
---

## Breadcrumbs

[Home](https://web-tolk.ru/en) > [Joomla extensions](https://web-tolk.ru/en/dev) > [Joomla plugins](/en/dev/joomla-plugins) > [WT PDF.js](/en/dev/joomla-plugins/wt-pdf-js) > [Documentation](/en/dev/joomla-plugins/wt-pdf-js/documentation) > PDF.js viewer URLs: file, page and zoom

# PDF.js viewer URLs: file, page and zoom

WT PDF.js - Documentation

**Category:** [Joomla plugins](https://web-tolk.ru/en/dev/joomla-plugins)

[Project](https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js)[Versions](https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/versions)[Documentation](https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation)[GitHub](https://github.com/mozilla/pdf.js)

The query is ?file=...&config=catalog.json ; the fragment is #page=2&zoom=150 .

## PDF location and initial view parameters

The query is `?file=...&config=catalog.json`; the fragment is `#page=2&zoom=150`. Encode the complete file value through `rawurlencode()`, `http_build_query()` or `URLSearchParams`, particularly for spaces, non-ASCII names and PDF URLs containing their own ? and &. Escape the final URL in HTML.

| Parameter | Example | Purpose |
| --- | --- | --- |
| `file` | `/images/documents/catalog.pdf` | Query: PDF sharing the viewer origin. |
| `config` | `catalog.json` | Query: user JSON filename. |
| `page` | `2` | Fragment: page number, starting at 1. |
| `zoom` | `150`, `page-width`, `page-fit`, `auto` | Fragment: zoom percentage or mode. |
| `pagemode` | `thumbs`, `bookmarks`, `attachments`, `layers`, `none` | Fragment: sidebar mode. |

The complete viewer requires matching PDF and viewer origins: scheme, hostname and port. It rejects remote file URLs even when CORS permits access. Host the PDF on your site or use your own server endpoint with access checks. Direct `getDocument()` use can load remote PDFs with suitable CORS. JSON is also fetched from the viewer origin.

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/joomla-plugins",
                "name": "Joomla plugins"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "@id": "/en/dev/joomla-plugins/wt-pdf-js",
                "name": "WT PDF.js"
            }
        },
        {
            "@type": "ListItem",
            "position": 5,
            "item": {
                "@id": "/en/dev/joomla-plugins/wt-pdf-js/documentation",
                "name": "Documentation"
            }
        },
        {
            "@type": "ListItem",
            "position": 6,
            "item": {
                "name": "PDF.js viewer URLs: file, page and zoom"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "contentUrl": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/viewer-url",
            "name": "PDF.js viewer URLs: file, page and zoom - WebTolk websites development, Joomla Extensions",
            "description": "The query is ?file=...&config=catalog.json ; the fragment is #page=2&zoom=150 . Encode the complete file value through rawurlencode() , http_build_query()…",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/TechArticle/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "TechArticle",
            "headline": "PDF.js viewer URLs: file, page and zoom",
            "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/viewer-url",
            "description": "The query is ?file=... config=catalog.json ; the fragment is #page=2 zoom=150 .",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/viewer-url"
            }
        }
    ]
}
```
