PDF viewer for the free version of Elementor allows you to quickly and easily embed one or more PDF files for viewing whether they are hosted on your own domain or on a remote domain.
You can define layout options to filter the actions available to your visitors like downloading or printing the exposed files.
PDF files can be embedded in the page or opened in a Modal box with a button or text.
Accessibility for the PDF viewer widget
Enter / Space keyboard keys on button/text to trigger the viewer
aria-label text 'Open PDF file' of the button/text
aria-expanded to indicate whether the viewer is expanded or not
aria-controls to identify the HTML tag whose contents are controlled
aria-haspopup equal 'dialog'
Tab keyboard key inside the viewer to move between links or controls
Enter / Space keyboard keys inside the viewer on close button (X) to close the viewer
Escape keyboard key exit the viewer
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
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.
Trigger the modal box and select the viewer options
If you have select the Modal box to display the PDF file you can choose the type of trigger, either a button or free text and then make the necessary adjustments.
- Show or hide the left toolbar
- Show or hide the right toolbar
- Display or not the ‘Download’ button
- Display or not the ‘Print’ button
- Select the zoom level when opening the PDF
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
PDF Viewer examples
As you can see two PDF file are displayed.
The first PDF is Embedded into the page with the ‘Download and Print’ buttons disabled.
- The PDF file is opened from the media library.
The second PDF is opened in a Fancybox after clicking on the button.
- The right and left toolbars are disabled but the ‘Download and Print’ buttons are active.
- The PDF file is opened from a remote domaine.