Select Page

How can we help you today?

Categories
← Back
Print

PDF Viewer

Meet the Pixel PDF Viewer module for Divi! Put menus, brochures, catalogues, guides and price lists right on your page, so visitors can read them without downloading a thing. Show the PDF in the browser’s own viewer, as a flipbook whose pages turn like a real book, or as pages that scroll down or sideways inside a frame. Links inside the PDF keep working, and a popup mode keeps your page light until someone asks for the file.

View Demo →

With the Pixel PDF Viewer module you can:

  1. Show any PDF from your media library on the page, inline or in a popup
  2. Choose the Default browser viewer, a Flipbook with turning pages, or Scroll with pages that scroll down or sideways
  3. Keep the PDF’s own links working, both to web pages and to other pages of the PDF
  4. Add Previous and Next buttons, a page count you can type into, and Full Screen and Download buttons
  5. Let the frame take its height from the PDF’s pages, so a page always fits on every screen size
  6. Show a card with a thumbnail, a title and a button on phones and tablets, or in place of the PDF until it is opened
  7. Style the frame, the navigation, the card, the popup and the button in the Design tab

How the module works

The module has two ways to show a PDF on the page, set by Display:

  • Inline shows the PDF right in the page, inside a frame
  • Popup shows a card with a button. The button opens the PDF in a popup, and the PDF only loads when the popup opens

The Viewer decides how the PDF itself is shown:

  • Default uses the browser’s own PDF viewer, with its toolbar for zoom, download and print
  • Flipbook shows the pages as a book, with the first page alone as its cover. Visitors turn the pages with the buttons, the arrow keys, a click or a swipe. On a narrow frame, the book shows one page at a time
  • Scroll shows the pages one below the other (Vertical) or side by side (Horizontal), scrolling inside the frame

Flipbook and Scroll draw the pages themselves, so they look and work the same in every browser and on every device, inline or in the popup. Only the pages around the one being read are drawn, so even a long PDF opens quickly.

NOTE: Phones, tablets and some browsers have no built-in PDF viewer. With the Default viewer, these visitors see the card with an Open PDF button instead, which opens the PDF in a new tab. Use Flipbook or Scroll to show the pages on every device.

How to add the PDF Viewer module

  1. Open a page with the Divi Visual Builder
  2. Click the + (Add New Module) button
  3. Search for Pixel PDF Viewer and click it to insert the module
  4. In PDF, upload your PDF to the media library or pick one that is already there
  5. In Viewer, choose Default, Flipbook or Scroll
  6. Set the frame’s height in Design > Frame, or turn on Fit Height to Page
  7. Save the page

NOTE: Flipbook and Scroll need a PDF from your media library, or from a site that allows other sites to load its files. If a PDF from another site does not show, upload it to your media library.

PDF

The PDF group in the Content tab holds the file and the card that goes with it:

  • PDF File is the PDF to show. Upload it to the media library or paste its URL
  • Display shows the PDF Inline on the page, or as a card that opens it in a Popup
  • Thumbnail is an image shown on the card, for example a picture of the cover
  • Use PDF Preview shows the picture of the first page that WordPress makes when you upload a PDF, when there is no Thumbnail
  • Icon is shown on the card when there is no thumbnail and no preview. Leave it empty for the PDF icon
  • Title names the PDF on the card and for screen readers. Leave it empty to use the file name
  • Description adds a line of text on the card, below the title

WordPress can only make the PDF Preview on servers with Imagick and Ghostscript, and only when the PDF is uploaded. The Visual Builder tells you when a PDF has no preview, and why. Add a Thumbnail in that case.

Viewer

The Viewer group sets how the PDF is shown and which buttons go with it:

  • Viewer is Default, Flipbook or Scroll
  • Direction (Scroll) stacks the pages and scrolls down (Vertical), or sets them side by side and scrolls sideways (Horizontal)
  • Page Fit (Scroll, Vertical) makes every page as wide as the frame (Fill), or shows each page complete inside the frame (Whole Page)
  • Initial View (Default) opens the PDF at Browser Default, Fit Page, Fit Width or Custom Zoom, with its Zoom %
  • Start Page is the page the PDF opens on
  • Show Browser Toolbar (Default) shows the browser’s own toolbar above the PDF
  • Show Full Screen Button (Flipbook, Scroll) adds a button that shows the PDF on the whole screen
  • Show Download Button (Flipbook, Scroll) adds a button that downloads the PDF

With Fill, text stays big and readable, and long pages scroll. With Whole Page, every page is shown complete and the scroll stops at each page, which suits a magazine or a lookbook. A Horizontal row always shows whole pages, as many as fit next to each other. Visitors scroll it with a trackpad, Shift and the mouse wheel, the arrow keys or the buttons, drag it with the mouse, or swipe it on a phone.

NOTE: Chrome, Edge and Firefox follow Initial View, Zoom % and Start Page. Safari always uses its own view, and only Chrome and Edge can hide the browser toolbar.

Open Button

The Open Button group sets the button that opens the PDF:

  • Button Text is the text of the button. Leave it empty for “Open PDF”
  • Always Show Open Button (Inline) shows the button under the PDF on every device, not only on phones and tablets

In Popup mode the button opens the popup. In Inline mode it opens the PDF in a new tab.

Design Settings

The Design tab has a group for every part of the module. Groups for parts you don’t use stay hidden, so the Popup group only appears when Display is Popup, and the Navigation group only with Flipbook or Scroll.

  • Frame sets the Height of the PDF, and its Background, Spacing, Border and Box Shadow. Use vh to size the frame from the browser window
  • Fit Height to Page (Frame) sets the frame’s height from the shape of the PDF’s pages, so a page, or a spread in the flipbook, always fills the frame’s width. It replaces Height
  • Navigation has a Buttons tab with the Arrow Color, Arrow Size, Background, Spacing, Border and Box Shadow of the page buttons, and a Page Count tab with Show Page Count and the count’s font and box
  • Card has Card, Icon, Title and Text tabs for the card’s alignment, background, spacing and border, the icon’s color, size and box, and the fonts of the title and the description
  • Thumbnail sets the size, border and shadow of the thumbnail on the card
  • Open Button styles the button with Divi’s full button settings
  • Popup sets the Popup Width, the Overlay Color behind the popup and the Close Button Color

The card and the popup are hard to see while you edit, so two builder-only toggles help you style them. Preview Card (Card) shows the card that phones and tablets get, and Preview Popup (Popup) shows the open popup in place of the card. Visitors never see these previews.

The Advanced tab adds Custom CSS fields for the Frame, Iframe, Card, Thumbnail, Icon, Title, Description, Button, Navigation Buttons, Page Count, Popup and Popup Close Button, next to Divi’s usual advanced settings.

Design Ideas

The PDF Viewer works for any document your visitors would otherwise have to download. A few ideas to get you started:

  1. Restaurant menu: a Flipbook with Fit Height to Page, so guests turn the pages of your menu like a real one
  2. Product catalogue: a vertical Scroll with Whole Page next to a short intro, with prices and links to your shop inside the PDF
  3. Travel or city guide: a horizontal Scroll that shows two pages side by side, which visitors can drag through with the mouse
  4. Resource library: a grid of cards in Popup mode, each with a thumbnail of the cover, so the PDFs only load when someone opens one
  5. Brochure download: the Default viewer with the browser toolbar, so visitors can zoom, print and save the brochure
Previous Parallax Images
Next Poll
Table of Contents