# Inline PDF Previews

**URL:** https://meta.discourse.org/t/inline-pdf-previews/157649
**Category:** Theme component
**Tags:** official, desktop, pdf-previews
**Created:** [July 13, 2020, 9:18pm UTC](https://meta.discourse.org/t/inline-pdf-previews/157649 "2020-07-13T21:18:10Z")
**Posts on this page:** 1
**Showing post:** 115

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [March 2, 2023, 3:32am UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/115 "2023-03-02T03:32:58Z")

</div>

@Ralf_Stockmann and @Alon1 have you tried…

> [@IFrame Lightboxes](https://meta.discourse.org/t/iframe-lightboxes/89853):
>
> This is a theme component that adds the ability to open iFrames in lightboxes. Samples This component adds an “expand” button on top of the iframes you enable it on. Clicking the button will open the iframe in fullscreen in a lightbox. Clicking either the dark area around the iframe or the x at the top right corner closes the lightbox. The same way it works for default image lightboxes. Settings There’s only one setting. You add the domains…

Also, on my Discourse I use this method…

### Embed a PDF from Google Drive

(This is my preferred method so **PDFs** in iFrames are responsive - other methods mostly fail at being cross-browser responsive.)

1. Share
2. Copy Share Link
3. Open Share Link in a New Tab
4. Click the 3 Vertical Dots in the Top Right Corner
5. Select Embed Item
6. Copy the Displayed iFrame Code
7. Paste it in the Discourse Editor

> A Test PDF on Google Drive is embedded here below which you can [\<\< Download Here \>\>](https://drive.google.com/file/d/1KQ-jn7R0NmZxw955QaPu3lvLFh5zpnDe/view?usp=sharing)

```plaintext
<iframe src="https://drive.google.com/file/d/1KQ-jn7R0NmZxw955QaPu3lvLFh5zpnDe/preview" width="640" height="480" allow="autoplay"></iframe>

```

This is what it looks like… (which you can also try out live [HERE](https://noobish.me/t/features-plugins-and-tools/165) on my site)

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/2/1/721bafc1d705a2bafd3a54c57f1451afda75df9a.png)

---

_[View the full topic](https://meta.discourse.org/t/inline-pdf-previews/157649)._
