---
title: "PDF.js viewer in Joomla: links and iframes - WebTolk websites development, Joomla Extensions"
description: "Each viewer includes its complete UI, local worker and resources. Choose a URL:"
url: "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/web-viewer"
date: "2026-10-09T19:21:22+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 in Joomla: links and iframes

# PDF.js viewer in Joomla: links and iframes

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)

Each viewer includes its complete UI, local worker and resources.

## Viewers for newer and older browsers

Each viewer includes its complete UI, local worker and resources. Choose a URL:

- Newer browsers: `/media/plg_system_wtpdfjs/viewer/modern/web/viewer.html`.
- Older browsers: `/media/plg_system_wtpdfjs/viewer/legacy/web/viewer.html`.

The parent page does not need `useScript()`: the viewer loads its own library in its window. The older-browser viewer still uses ES modules; this does not imply Internet Explorer support. Test your target browsers.

Pass the PDF in the `file` query parameter, the profile in `config`, and page/zoom after `#`. The example includes a link and an iframe; choose the appropriate UI. `Uri::root(true)` accounts for Joomla subdirectory installations. For older browsers, replace `modern` with `legacy` in the viewer URL.

### PHP example

```
<?php
use Joomla\CMS\Uri\Uri;
$root = Uri::root(true);
$pdfUrl = $root . '/images/documents/catalog.pdf';
$viewerUrl = $root . '/media/plg_system_wtpdfjs/viewer/modern/web/viewer.html';
$query = http_build_query(
    ['file' => $pdfUrl, 'config' => 'catalog.json'],
    '', '&', PHP_QUERY_RFC3986
);
$src = $viewerUrl . '?' . $query . '#page=1&zoom=page-width';
$escapedSrc = htmlspecialchars($src, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
?>
<p><a href="/<?php echo $escapedSrc; ?>" target="_blank" rel="noopener">PDF</a></p>
<iframe src="/<?php echo $escapedSrc; ?>" title="PDF document"
    loading="lazy" style="width:100%;height:75vh;border:0" allowfullscreen>
</iframe>
```

## 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 in Joomla: links and iframes"
            }
        }
    ]
}
```

```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/web-viewer",
            "name": "PDF.js viewer in Joomla: links and iframes - WebTolk websites development, Joomla Extensions",
            "description": "Each viewer includes its complete UI, local worker and resources. Choose a URL:",
            "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 in Joomla: links and iframes",
            "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/web-viewer",
            "description": "Each viewer includes its complete UI, local worker and resources.",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/joomla-plugins/wt-pdf-js/documentation/web-viewer"
            }
        }
    ]
}
```
