# Displaying PDF in Webview in GlideApps

**URL:** <https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606>\
**Category:** Ask for Help\
**Created:** [August 24, 2022, 9:16am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606 "2022-08-24T09:16:53Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 24, 2022, 9:16am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/1 "2022-08-24T09:16:53Z")

</div>

Okay, so my use case is to display documents for signing through a Glide App. The original plan was a Glide Page (but there is no signature component).

Now, it Glide Pages the following works for me perfectly:  
[https://drive.google.com/uc?id={{ID}](https://drive.google.com/uc?id=%7B%7BID%7D)}

But when I put this in GlideApps I get HTML returned.

Any body got any suggestions?

PS: my documents are shared within our organization, I cannot turn on public sharing as it is company information. But in saying that, it is still working in Glide Pages even with the restricted sharing.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 24, 2022, 11:53am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/2 "2022-08-24T11:53:34Z")

</div>

This isn’t a direct answer, but read through this thread. There is a lot of discussion regarding various ways to wrap the url of the PDF so you can display it nicely in an app. Along with some trial and error to cope with various problems.

> [@Embed Pdf from Google drive with webview](https://community.glideapps.com/t/embed-pdf-from-google-drive-with-webview/38965):
>
> Hi, guys, Does this anyone already know? I accidentally discovered that a pdf file stored on google drive can be embedded into a webview component if the end of the URL is replaced with the /preview.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 24, 2022, 12:33pm UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/3 "2022-08-24T12:33:00Z")

</div>

Your method still works for me nowadays, and I indeed use it every time I need to embed a PDF.

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 7:55am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/4 "2022-08-27T07:55:55Z")

</div>

I have tried all different examples. And I am having no luck just yet. I will update if I find a solution

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 27, 2022, 8:38am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/5 "2022-08-27T08:38:40Z")

</div>

Get script to create a file in your g drive and save the link in the same row… then you can display it in image element

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 8:41am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/6 "2022-08-27T08:41:44Z")

</div>

@Uzo I am not sure which script. I am using Airtable as my data source.

Also, I need to have access to then entire document, not just the first page

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 27, 2022, 8:42am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/7 "2022-08-27T08:42:50Z")

</div>

Oh…always use Google sheets, is the most powerful tool in the world…  
Transfer your air tables  
If you dig dip, you will find out… that everything on some point, runs on Google services

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 9:01am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/8 "2022-08-27T09:01:12Z")

</div>

So i have found success with using this:

[https://docs.google.com/viewer?embedded=true&url=](https://docs.google.com/viewer?embedded=true&url=)(Document URL)

I am hosting my document in Airtable. Using a template column to join them. Now, it seems to be okay

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 27, 2022, 9:02am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/9 "2022-08-27T09:02:25Z")

</div>

There you go…

---

<div class="post-metadata">

**Author:** ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)\
**Post date:** [August 27, 2022, 10:07am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/10 "2022-08-27T10:07:52Z")

</div>

If your file is on google drive  
Use the following link:

[https://drive.google.com/file/d/](https://drive.google.com/file/d/)/preview

This works in webview embed

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 10:14am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/11 "2022-08-27T10:14:55Z")

</div>

> [@ShantanuIyengar](#):
>
> [https://drive.google.com/file/d//preview](https://drive.google.com/file/d//preview)

Unfortunately this is not working for me. It just says [drive.google.com](http://drive.google.com) may not allow itself to be embedded

---

<div class="post-metadata">

**Author:** ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)\
**Post date:** [August 27, 2022, 11:00am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/12 "2022-08-27T11:00:50Z")

</div>

Can you share the file link?

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 11:13am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/13 "2022-08-27T11:13:49Z")

</div>

@ShantanuIyengar

[https://drive.google.com/file/d/1OXR97mAxLj7j3hdDp5c8vz2jt777RZh5/preview](https://drive.google.com/file/d/1OXR97mAxLj7j3hdDp5c8vz2jt777RZh5/preview)

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 11:17am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/14 "2022-08-27T11:17:14Z")

</div>

> [@Mitch\_Thorp](#):
>
> [https://drive.google.com/file/d/1OXR97mAxLj7j3hdDp5c8vz2jt777RZh5/preview](https://drive.google.com/file/d/1OXR97mAxLj7j3hdDp5c8vz2jt777RZh5/preview)

 ![Screen Shot 2022-08-27 at 2.16.46 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7dee846756f3706ff9a4c909f4ba65e931307d38.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 27, 2022, 11:27am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/15 "2022-08-27T11:27:07Z")

</div>

Mitch - I don’t think that will work unless it’s public. I saw you mentioned earlier that it works in Pages. My guess would be because the browser you’re viewing in is already authenticated with your Google account. I suspect that if you tried it in a different browser - one that isn’t already authenticated - then you’d get the same result as you’re seeing in the app.

---

<div class="post-metadata">

**Author:** ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)\
**Post date:** [August 27, 2022, 11:41am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/16 "2022-08-27T11:41:17Z")

</div>

Please change the sharing options for the file, and it should work about 99% of the time!

---

<div class="post-metadata">

**Author:** ![Mitch\_Thorp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mitch_thorp/32/23428_2.png) [@Mitch\_Thorp](https://community.glideapps.com/u/Mitch_Thorp)\
**Post date:** [August 27, 2022, 11:50am UTC](https://community.glideapps.com/t/displaying-pdf-in-webview-in-glideapps/47606/17 "2022-08-27T11:50:42Z")

</div>

@Darren_Murphy I just opened in a another browser that I’m not signed into and it never worked. You’re correct.

@ShantanuIyengar I cannot change sharing options. The documents we are using contains sensitive information.

I am going to go with the Airtable attachment route. Then use the url created from that to display the PDF in the webview
