Add a PDF viewer to Elementor

Activate the component PDF viewer

The plugin Elementor is installed and active.

The plugin EAC components is installed and active.

From the settings panel (EAC advanced) you have to drag & drop the ‘PDF viewer‘ icon on the panel preview.

Select the origin of the pdf and how to display it

  • The PDF file is loaded from the media library or from an URL. Access to the files of the media library is done by a custom control
  • The PDF file is embedded in the page or opened in a Modal box
  • Origin URL supports Dynamic ACF File or ACF Group File tags
PDF origine media file
Select the origin of the pdf
Select how the PDF is displayed
PDF URL dynamic ACF file
You can choose Dynamic ACF File

Create a link to the PDF file in Google Drive

  • Use the ‘Get Shared Link’ option in Google Drive to get the URL
  • Original Url: https://drive.google.com/file/d/XXXXX/view?usp=sharing
  • Target Url: https://drive.google.com/uc?export=view&id=XXXXX

Copy the ID from the original to the target and you obtain the Url.

Apply styles to affected elements

In the ‘Style’ tab you can apply the styles relative to the options you have selected before.

  • So if the PDF file is embedded into the page you can modify the dimensions and the style of the file container
  • For the Modal box size the width of the container, the height is calculated automatically
  • And finally if the PDF is opened in a modal box, you can modify the style of the button or the text that triggers its opening
Styling the embedded file
Styling the Modal box
PDF styling trigger button
Styling the trigger button

Leave a Comment