---
title: Inline PDF Viewer setup guide | All Gusto
description: "Set up Inline PDF Viewer, a free HubSpot module: add it to a page, choose the PDF, name the document and turn on the form gate if you need one."
---

[Skip to content](https://allgusto.com/hubspot-apps-and-themes/hubspot-pdf-viewer/docs#main)

[![All Gusto](https://allgusto.com/hs-fs/hubfs/All%20Gusto%20-%20Logo%20-%20Black%20-%20Transparent-1.png?width=340&height=226)](https://allgusto.com/)

- [Home](https://allgusto.com/)
- [About](https://allgusto.com/about)
- [Apps and Themes](https://allgusto.com/hubspot-apps-and-themes)
- [Blog](https://allgusto.com/blog)
- [Contact](https://allgusto.com/contact-us)

1. [Apps and Themes](https://allgusto.com/hubspot-apps-and-themes)
2. Docs

# Inline PDF Viewer: setup guide

Marketplace Version 1. Support: email info@allgusto.com. I reply within one business day.

## Add the viewer

1. Upload your PDF to the File Manager (Content \> Files).
2. Edit a website page, landing page or blog post and drag in **Inline PDF Viewer**.
3. Under **PDF file**, pick the PDF. Add a **Document title**; it names the viewer for screen readers and the downloaded file.
4. Preview at desktop and phone width, then publish.

## Fields

| Field | Default | What it does |
| --- | --- | --- |
| PDF file | none | The PDF to show, from the File Manager. |
| Document title | empty | Accessible name of the viewer and the download file name. |
| Heading above the viewer | empty | Optional heading above the viewer. |
| Show download button | on | Download button. |
| Show print button | on | Print button. Browsers without a PDF reader get a printable copy in a new tab. |
| Show search | on | Search inside the PDF. Ctrl+F or Cmd+F opens it while focus is in the viewer. |
| Show page thumbnails | on | Thumbnail sidebar. |
| Deep links to a page (#page=N) | on | `#page=N` opens that page and the address follows the reader. |
| Viewer height (px) | 680 | Height of the reading area. |
| Starting page | 1 | Page the viewer opens on. A `#page=` link wins. |
| Starting zoom | Fit width | Fit width or Fit whole page. |
| Load Chinese, Japanese and Korean fonts from jsDelivr | off | See Outside requests. |
| HubSpot custom event internal name | empty | Optional. Sends each viewer action to a HubSpot custom event. Blank sends nothing to HubSpot. See Tracking. |
| Accent color | #1f4fd1 | Toolbar highlight, current thumbnail and the gate's Submit button. Keep white text at 4.5:1 or better on it. |
| Form gate \> Ask for a HubSpot form | No form | No form, Before reading the rest, or Before downloading only. |
| Labels | English | Page counter, Download, error and Search text. |

## Form gate

Under **Form gate**, pick a **HubSpot form** and a mode. **Before reading the rest** shows the **Free pages before the form** (default 2), then a form; the rest of the pages unlock when the form is submitted. Download and Print open the form while the document is locked, locked thumbnails show a lock, and search counts locked matches without jumping to them. **Before downloading only** keeps every page readable and asks for the form before Download or Print. A submit is remembered for **Remember the visitor for (days)** (default 180). **Document key (optional)** lets several viewers share one unlock; it defaults to the PDF address.

It is a soft gate. The PDF address is in the page source, so it collects contacts; it does not protect the file.

## Outside requests

By default the viewer loads nothing from outside HubSpot. Some PDFs use Chinese, Japanese or Korean fonts without including them. With **Load Chinese, Japanese and Korean fonts from jsDelivr** on, only those PDFs fetch the missing font data from jsDelivr, a public file host, which sees the visitor's IP address. With it off, that text may not show or be searchable. PDFs that include their fonts work either way.

## Tracking

The viewer pushes page views and read depth (25, 50, 75 and 100 percent of pages reached, once each) to `window.dataLayer`, as `pdf_viewer_page_view` and `pdf_viewer_progress` (with `pdf_percent`), plus `pdf_viewer_download`, `pdf_viewer_print`, `pdf_viewer_zoom`, `pdf_viewer_fullscreen`, `pdf_viewer_swipe` and `pdf_viewer_gate_unlocked`. Use them in Google Tag Manager or GA4. Opening on a starting page or a `#page=` link sends no progress event; reading on from there does.

To also record them in HubSpot (custom events need a Professional or Enterprise HubSpot plan):

1. In HubSpot, go to Data Management \> Event Management, click Create an event, then Create custom event, and choose Code Javascript. Name it, for example "PDF viewer", and associate it with Contacts.
2. Add the properties `pdf_action`, `pdf_document`, `pdf_page`, `pdf_total_pages` and `pdf_percent`.
3. Open the event and copy its **Internal name**. It is `pe`, then your HubSpot account ID, then an underscore and the event name, for example `pe1234567_pdf_viewer`. You do not need to add HubSpot's code snippet; the viewer sends the event itself.
4. Paste it into **HubSpot custom event internal name** on the module.

Each action is then sent to that one event, with `pdf_action` set to `page_view`, `progress`, `download`, `print`, `zoom`, `fullscreen`, `swipe` or `gate_unlocked`. Events show on the contact's timeline once HubSpot knows the visitor. Every action is one event occurrence and counts toward HubSpot's monthly custom event limit. With the field blank, the viewer sends nothing to HubSpot.

## If a PDF will not show

The viewer says why (password-protected, damaged, not found, or blocked by another site) and keeps an Open the PDF link. A PDF hosted on another site needs that site to allow cross-origin requests; files in your HubSpot File Manager work.

## Limits

- One PDF per viewer. Several viewers can share a page.
- Scanned PDFs without a text layer show, but search finds nothing.
- The form gate is not a security control.

© 2026 All Gusto, LLC

- [Home](https://allgusto.com/)
- [About](https://allgusto.com/about)
- [Apps and Themes](https://allgusto.com/hubspot-apps-and-themes)
- [Gatehouse member portal theme](https://allgusto.com/hubspot-apps-and-themes/gatehouse-member-portal)
- [Events Calendar and Agenda module](https://allgusto.com/hubspot-apps-and-themes/events-calendar-and-agenda)
- [Blog](https://allgusto.com/blog)
- [Contact](https://allgusto.com/contact-us)
- [Privacy](https://allgusto.com/privacy)
- [Terms](https://allgusto.com/terms)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BreadcrumbList",
  "itemListElement" : [ {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/",
    "name" : "Home",
    "position" : 1
  }, {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/hubspot-apps-and-themes",
    "name" : "Apps and Themes",
    "position" : 2
  }, {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/hubspot-apps-and-themes/hubspot-pdf-viewer/docs",
    "name" : "Docs",
    "position" : 3
  } ]
}
```