Displaying PDF’s in an iFrame

with Sparkle

If you want to display a PDF document inside your Sparkle page, you can do so with an iFrame. In this example, the iframe is placed on the page through the embed object. Simply place the object on the page and add the iframe code through the style panel. You can get the code from the link below. This code will allow the object to be seen across all devices. You can make adjustments to the code to alter the aspect ratio of the iFrame. The code is documented to show where to do this. On mobile browsers, the PDF file in the iframe may be replaced by a button prompting users to open the pdf. This will usually result in the PDF opening in a PDF viewer app on the user’s device.

Get Code

Each browser will have its own tools for downloading and viewing PDF’s. These tools will usually appear when a mouse is hovered over the  bottom of the PDF Frame.