BoxLang 🚀 A New JVM Dynamic Language Learn More...

PresideCMS Extension: PDF Viewer

v1.1.1 Preside Extensions

PDF Viewer for Preside

This extension allows you to embed PDF files in web pages using the Adobe PDF Embed API.

The PDF Embed API allows cross-platform display of PDFs in web pages with no installation required.

Pre-requisites

In order to use the Adobe PDF Embed API, you need to obtain (free) credentials for the Adobe Document Services API:

https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html

Enter the provided Client ID in the PDF Viewer system settings panel, and you're ready to go!

The widget

Use the widget to choose a PDF file from the Asset Manager, and one of three available embed modes. Each mode has a few extra options available to control the PDF display interface.

Lightbox mode displays a rendered thumbnail of the PDF on the webpage; when clicked, this will load the PDF in a lightbox overlay, filling the whole viewport.

The advantage of this method is that the PDF content is only loaded when the user chooses to view it (the Adobe Viewer produces a lot more data to transfer than just the size of the original PDF).

Sized container

The sized container renders the PDF in a container which fills all the available width, and whose height is governed by the aspect ratio of the PDF content; the container fits a single page of the PDF at a time.

In-line

In-line rendering displays the PDF in a container which fills all the available width. However, it is displayed as one long, unpaged piece of content.

Changelog

v1.1.1

  • Fix scoping issue with multiple PDFs on same page

v1.1.0

  • Update to use newer viewer script for better UX

v1.0.3

  • Fix aspect ratio padding fallback on sized container

v1.0.2

  • Fix sized container rendering if calculated dimensions are invalid

v1.0.1

  • Move lightbox link text to i18n

v1.0.0

  • Initial public release

$ box install preside-ext-pdf-viewer

No collaborators yet.
     
  • {{ getFullDate("2021-05-02T14:33:19Z") }}
  • {{ getFullDate("2024-09-19T09:45:11Z") }}
  • 2,120
  • 28,973