# Unable to load PDF from webdev resource in 8.1.32

**URL:** <https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760>\
**Category:** Ignition\
**Tags:** vision, ignition81, perspective\
**Created:** [August 16, 2024, 5:15pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760 "2024-08-16T17:15:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 16, 2024, 5:15pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/1 "2024-08-16T17:15:17Z")

</div>

I am attempting to load a PDF into the Perspective PDF Viewer component using the webdev module. I watched this video first to understand the process:

> **[PDF Viewer Video at Inductive University](https://inductiveuniversity.com/videos/perspective-pdf-viewer/8.1)**
>
> Learn about Perspective's PDF Viewer component.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/c/9c4b37fd4673bf860cf4cbcecdd5746459a6b69f.png)

The path I am linking to is **C:\PDF\test.pdf**

I right click on the resource test.pdf --\> select copy path --\> and paste the path into the source of the PDF viewer.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/d/cd11fa9a5efa8c0d0e30f17e88f18e95d14c87a9.png)

And I get the following error. Any ideas what I am doing wrong?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 16, 2024, 5:18pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/2 "2024-08-16T17:18:42Z")

</div>

The actual path you need is longer - try `/system/webdev/$yourProjectName/test.pdf`.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 16, 2024, 5:22pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/3 "2024-08-16T17:22:26Z")

</div>

No luck.

I am also trying path(s) in the Vision PDF Viewer as well and get the following error in the output console:

```python
12:21:23.023 [AWT-EventQueue-0] WARN r.VisionComponents.PDFViewer - Unable to open URL '/system/webdev/ProjectName/test.pdf'
java.net.MalformedURLException: no protocol: /system/webdev/ProjectName/test.pdf
```

Not sure if relevant or not.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 16, 2024, 5:31pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/4 "2024-08-16T17:31:33Z")

</div>

In Vision you're going to have to use a fully qualified URL, as in `http://localhost:8088/system/webdev/$projectName/test.pdf` - you can use [`system.util.getGatewayAddress`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getGatewayAddress) to make it less fragile.

Does the URL work in a web browser? There should be an option on the webdev node to 'Copy Mounted Path' in the right click menu, as well.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 16, 2024, 5:36pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/5 "2024-08-16T17:36:17Z")

</div>

The 'mounted path' returns

```python
/system/webdev/ProjectName/test.pdf
```

Which still fails in the Perspective PDF viewer.

The fully qualified path

```python
http://localhost:8088/system/webdev/ProjectName/test.pdf
```

Does work in the Vision PDF viewer and also through the web.

So that narrows my problem down to the Perspective PDF Viewer.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 16, 2024, 5:41pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/6 "2024-08-16T17:41:20Z")

</div>

Open the view with the PDF viewer in a regular browser session and look at the dev tools - specifically check the console for errors and look at the network logs to see the full request path.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 16, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-pdf-from-webdev-resource-in-8-1-32/94760/7 "2024-08-16T17:45:43Z")

</div>

I went to load a view with the PDF viewer in a regular browser and it loaded just fine. I then closed the view in the designer and re opened it and it loaded fine there as well.

So my first problem was definitely not using the full path but also appears my designer view didn't get the memo to preview it for me right away.
