# Embed PDF in v3

**URL:** <https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285>\
**Category:** RapidWeaver Elements\
**Created:** [August 10, 2026, 3:08pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285 "2026-08-10T15:08:44Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [August 11, 2026, 5:53am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/21 "2026-08-11T05:53:29Z")

</div>

@GlenAllan

[https://forums.realmacsoftware.com/t/updated-free-devpacks-introducing-antenna-universal-feed-reader-rss-and-more/57173/6?u=upssjw](https://forums.realmacsoftware.com/t/updated-free-devpacks-introducing-antenna-universal-feed-reader-rss-and-more/57173/6)

---

<div class="post-metadata">

**Author:** ![GlenAllan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/glenallan/32/36908_2.png) [@GlenAllan](https://forums.realmacsoftware.com/u/GlenAllan)\
**Post date:** [August 11, 2026, 6:00am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/22 "2026-08-11T06:00:58Z")

</div>

Hmm. I have mixed feelings about that. I wonder if it’s just more along the lines of a real vetting system than exclusivity. Also makes me wonder if there’s a way to sideload.

Anyway, interesting.

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [August 11, 2026, 6:07am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/23 "2026-08-11T06:07:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![GlenAllan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/glenallan/32/36908_2.png) [@GlenAllan](https://forums.realmacsoftware.com/u/GlenAllan)\
**Post date:** [August 11, 2026, 6:10am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/24 "2026-08-11T06:10:27Z")

</div>

All right. Yeah. Other than being able to, turn off a bunch of those options, not show the thumbnails (if you wanted to), or show them, whatever, that’s pretty damn cool.

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [August 11, 2026, 11:00am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/25 "2026-08-11T11:00:44Z")

</div>

Context: Way back in February Dan and Ben were very “moustachioed” and I did a little bit of a play to embed a PDF. At the time I gave it away as a free project but took it down after. month.

Here is that little free project again and instructions are on page two of file. This opens an embedded PDF by button and/or picture. Hope this helps.

[elementsapp://downloadDocument/krXDdyaRxlk3](elementsapp://downloadDocument/krXDdyaRxlk3)

---

<div class="post-metadata">

**Author:** ![IdahoSAM](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/idahosam/32/15242_2.png) [@IdahoSAM](https://forums.realmacsoftware.com/u/IdahoSAM)\
**Post date:** [August 13, 2026, 7:49pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/26 "2026-08-13T19:49:34Z")

</div>

One thing I noticed when trying to view the PDF on my iPhone was that when the viewer opens, there are words “Open PDF”, which when clicked on, open the PDF in a browser window. The problem is that there is no way to return to the app. For a casual user they would feel “stuck” someplace and not know how to escape that open PDF window. The browser itself doesn’t show.  
Am I doing something wrong in the setup of the viewer?

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37799_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [August 13, 2026, 9:50pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/27 "2026-08-13T21:50:55Z")

</div>

![Screenshot 2026-08-13 at 4.45.23 PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/e/f/efbf69759a34c68cf62fcb7bae2663b22b96d2e7.webp)

 ![Screenshot 2026-08-13 at 4.45.57 PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/f/6/f6b6a378faf99761008569fc4f940d1b1514853b.webp)

Not sure if you meant this for me? my component is PDF Viewer…

It opens the PDF in the viewer

---

<div class="post-metadata">

**Author:** ![IdahoSAM](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/idahosam/32/15242_2.png) [@IdahoSAM](https://forums.realmacsoftware.com/u/IdahoSAM)\
**Post date:** [August 13, 2026, 10:09pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/28 "2026-08-13T22:09:52Z")

</div>

@MichaelDroste Yes. I am referring to the PDF Viewer. What happens on your phone when you display a PDF? On my desktops, the viewer works great. But on my phone I see the viewer window with words “Open PDF” (NOT seen when using my laptop). When I click on open PDF, the PDF opens and can be viewed. It is FULL Screen. I just discovered that if I swipe left from the very left side of the PDF, the window disappears and I am back to the webpage. This would not be intuitive for most users. Is there a setting that I am missing, like a close button or something that would let me exit the PDF Viewer?  
Thanks!

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37799_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [August 13, 2026, 10:51pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/29 "2026-08-13T22:51:51Z")

</div>

Strange - will look on Friday- I can confirm that it is happening…

Sorry for that …

-Mike

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37799_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [August 14, 2026, 2:21am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/30 "2026-08-14T02:21:34Z")

</div>

Couldn’t Sleep - will post link to new files in 20 minutes all working - testing running checks

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37799_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [August 14, 2026, 2:44am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/31 "2026-08-14T02:44:31Z")

</div>

Here ya go all have been updated

Check new thread for latest updates

---

<div class="post-metadata">

**Author:** ![GlenAllan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/glenallan/32/36908_2.png) [@GlenAllan](https://forums.realmacsoftware.com/u/GlenAllan)\
**Post date:** [August 14, 2026, 8:21am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/32 "2026-08-14T08:21:22Z")

</div>

Since I’m using the PDF viewer inside of a modal, I’m assuming that this issue on mobile is not really going to be the same issue, or is that not the case? As in, what exactly is the difference here? Kind of curious to know.

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37799_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [August 14, 2026, 10:05am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/33 "2026-08-14T10:05:33Z")

</div>

From Claude:

the modal doesn’t change anything about the mobile PDF problem, because the modal is a _container_ and the mobile problem is a _renderer_ problem.

**The actual difference is what paints the PDF, not where it sits:**

- **`<iframe>` / `<embed>` / `<object>`** — hands the file to the browser’s built-in PDF handler. iOS and iPadOS Safari paint page 1 only and never scroll; Android Chrome usually won’t render it at all and offers a download instead. A modal is just a positioned div with an overlay — the iframe inside it hits the exact same WebKit path it would in normal page flow. Z-index, fullscreen, and overlays are irrelevant to that engine.
- **PDF.js** — JavaScript draws each page to a `<canvas>`. No native PDF handler involved, so mobile works fine.
- **Direct link (`target="_blank"`)** — hands off to the OS full-screen viewer. Scrolls and pinch-zooms everywhere.

So in the current build - already covered: touch devices get routed to the PDF.js path by the `pointer: coarse` / `maxTouchPoints` check before an iframe is ever created. Modal or not, no touch device sees the embed.

**What the modal _does_ introduce is a separate set of problems** you’ll likely hit and mistake for the original bug:

- **Zero-height init.** PDF.js scales pages off the measured container. If the modal is `display: none` until opened, it measures 0×0 and pages render tiny or not at all. Fix: init or force a re-render _after_ the modal is visible.
- **`100vh` on iOS.** Safari’s URL bar makes `100vh` taller than the visible area, pushing the close button and toolbar off-screen. Use `100dvh` with a `100vh` fallback.
- **Body scroll lock.** Locking the body on open can also kill scrolling inside the PDF pane on iOS. `overscroll-behavior: contain` on the scroll container, and no global `touchmove` preventDefault.
- **Transform on an ancestor.** If the modal animates in with a transform, any `position: fixed` child (sticky toolbar, page controls) positions against the modal instead of the viewport. Drop the transform when the animation ends.
- **Gesture collisions.** Backdrop-tap-to-close and swipe-to-dismiss will swallow the PDF’s own pan/pinch. Scope the dismiss handler to the backdrop element only.

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [August 15, 2026, 10:27am UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/34 "2026-08-15T10:27:01Z")

</div>

Stephen did you look at my sample project I posted for you?

---

<div class="post-metadata">

**Author:** ![IdahoSAM](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/idahosam/32/15242_2.png) [@IdahoSAM](https://forums.realmacsoftware.com/u/IdahoSAM)\
**Post date:** [August 15, 2026, 2:08pm UTC](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285/35 "2026-08-15T14:08:44Z")

</div>

Yes I did. I actually saw this earlier this year when it was posted. Fun project. One day I may get to a point of creating graphics like in your project. Thanks!

[Previous page](https://forums.realmacsoftware.com/t/embed-pdf-in-v3/57285.md?page=1)
