# The FileDeck viewer: self-hosted PDF viewing

*Collection: Displaying Libraries · Category: Configuration · Availability: FileDeck Pro · Canonical URL: https://www.getfiledeck.com/docs/pdf-viewer/*

The [inline embed](https://www.getfiledeck.com/docs/inline-document-embed/) normally shows a PDF with the browser's built-in viewer, or an external viewer service. FileDeck Pro adds a third option: the **FileDeck viewer** — a PDF viewer served entirely from your own site (built on Mozilla's pdf.js, which FileDeck ships), with a toolbar the browser viewer doesn't give you and none of the external-service constraints.

> **FileDeck Pro** — the FileDeck viewer is included in all Pro plans. [See pricing](https://www.getfiledeck.com/pricing/)

## Why a self-hosted viewer

- **Nothing leaves your server.** The Microsoft and Google viewers fetch the document from their own servers, so they only work for publicly reachable files — and FileDeck [never sends protected files to them](https://www.getfiledeck.com/docs/inline-document-embed/). The FileDeck viewer renders in the visitor's browser from your own URLs, so **protected files, signed links, [view-only documents](https://www.getfiledeck.com/docs/view-only-documents/) and [watermarked](https://www.getfiledeck.com/docs/pdf-watermarking/) streams all display** — the cases external viewers structurally cannot serve.
- **A consistent viewer everywhere.** Browsers differ in what their PDF chrome offers (and some mobile browsers just download the file). The FileDeck viewer looks and behaves the same for every visitor.
- **A real text layer.** Pages render with selectable, screen-reader-readable text, not flat images.

## Using it

Per embed:

```
[filedeck_embed id="123" engine="pdfjs"]
```

Or pick **FileDeck viewer** as the engine in the Document Embed block / Elementor widget, or site-wide under **Settings → Features → Document viewer**. It applies to PDFs in inline embeds; other file types and the preview lightbox keep their normal engines.

## The toolbar

- **Sidebar** — the button at the left opens the document's **Outline** (its bookmarks, nested as the PDF has them) and **Pages** (a thumbnail of each page, drawn as you scroll to it, with the current page outlined). Pick an entry to jump there. The Outline tab only appears when the PDF has bookmarks. On a narrow screen the sidebar slides over the pages instead of squeezing them, and Esc closes it.
- **Pages** — previous/next and a live "page 2 / 14" position as you scroll.
- **Zoom** — − and +, or pick **Fit width** (the default), **Fit page** or 50%–400%, re-rendered crisply at each step.
- **Find** — search the document's text, jump between matches, with matches highlighted on the page.
- **Print** — prints just the document, not the page around it.
- **Full screen** — the embed frame's full-screen button works here as with every engine, and the optional download link below the viewer follows the embed's `download` setting.

## Links inside your PDFs

Links work the way they do in a desktop PDF reader. Contents entries and "see page 12" links jump to that place in the viewer; links to websites open in a new tab, and email links open the visitor's mail app. Only web and email links are made clickable.

## Linking to a page

Add `#page=` and a page number to the address of any page with a viewer — `https://example.com/handbook/#page=12` — and the first viewer on that page opens at page 12. To start an embed at a page every time, give it a starting page:

```
[filedeck_embed id="123" engine="pdfjs" page="5"]
```

or set **Start at page** in the Document Embed block or the Elementor widget. A `#page=` in the address wins over the starting page. The starting page also works with the browser's own viewer in Chrome, Edge and Firefox (Safari ignores it).

## Fast on long documents

The viewer waits to load the PDF until a visitor scrolls near it, and draws pages as they come into view rather than all at once, so a long handbook further down a page doesn't slow the page down for visitors who don't scroll that far.

## Popup mode

Any embed can also open in a popup instead of sitting in the page:

```
[filedeck_embed id="123" mode="popup"]
```

Renders a **View** button; the document opens in an overlay and — unlike an inline embed — **loads only when opened**, so a page with several popup embeds stays fast. Works with every engine, and the overlay closes with the × button, the backdrop, or Esc. Popup mode is part of Pro.

## FAQ

### Does this send my PDFs to any third party?

No. The viewer is served from your own site and reads the file from your own URLs. No external viewer service is involved — that's the point.

### Why does a protected Office file still show a download button?

The FileDeck viewer renders PDFs. By default Office formats need an external viewer service, which FileDeck refuses to hand protected files, so those fall back to a download button. Turn on [Office previews](https://www.getfiledeck.com/docs/office-previews/) to preview them from your own site. Details: [inline embed](https://www.getfiledeck.com/docs/inline-document-embed/).

### The viewer shows a plain PDF frame instead of the toolbar.

If the viewer cannot load the document — an unreadable file, or JavaScript is unavailable — it falls back to the browser's own PDF display, so the visitor still sees the document.
