How to Embed a PDF from Google Drive on a Page

Follow

You can show a PDF, such as an infographic, whitepaper, or sales deck, on your page without visitors having to download it. This method embeds a PDF stored in Google Drive. In most cases, show the PDF in a lightbox or on the form confirmation dialog rather than on the main page.

To offer a file as a download after a form submission instead, see Adding and Editing Buttons and Confirmation Pages.

This is a community workaround, not an official Unbounce feature. Unbounce Support can't troubleshoot embedded third-party content.

Embed the PDF on your page

  1. In Google Drive, open the file's sharing settings. Set access to Anyone with the link and click Done. You can also limit access to people at your company or specific people, but only they will be able to view the PDF.

    Google Drive "Share with others" dialog showing link sharing enabled with "Anyone with the link can view" option selected.

  2. Open the file's menu and select Open in new window.

    Google Drive context menu with "Open in new window" option highlighted by a red arrow.

  3. In the new window, open the menu and select Embed item.

    Google Drive context menu with an arrow pointing to "Embed item..." option highlighted in gray.

  4. Copy the HTML embed code.

    Google Drive "Embed item" dialog showing iframe HTML code to copy for embedding a PDF on a website.

  5. Paste the code into a Custom HTML element on your page.
  1. From the embed code in step 4, copy the URL in the src attribute.
  2. Select the image or button that should open the PDF, set its click action to Go to URL in Lightbox, and paste the URL.

For text links, see Adding and Editing Buttons and Confirmation Pages.

Test the change

Run an A/B test with a small share of traffic to confirm the change doesn't lower your conversion rate. See How to Run an A/B Test.