# PDF viewer perspective with document as bytes

**URL:** <https://forum.inductiveautomation.com/t/pdf-viewer-perspective-with-document-as-bytes/79108>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 13, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/pdf-viewer-perspective-with-document-as-bytes/79108 "2023-09-13T19:01:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 13, 2023, 7:50pm UTC](https://forum.inductiveautomation.com/t/pdf-viewer-perspective-with-document-as-bytes/79108/2 "2023-09-13T19:50:44Z")

</div>

Sounds like you are trying to convert a Vision app, where you can supply bytes directly to the PDF viewer component.

Perspective's PDF viewer needs a URL, because it is a browser. And browser won't let you access `file://` URLs from within another page, for security reasons. You will need to serve those files to your browser via another webserver with IFrame-compatible headers (cross-site aka CORS headers), or serve them from Ignition itself via the WebDev module.

If you have the option to put your PDFs in a database as blobs, you could as use my free Blob Server module:

> [@Automation Professionals' Blob Server Module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970):
>
> Automation Professionals is pleased to announce an alpha release of its new Blob Server Module. Available only for Ignition v8.1, here. The Blob Server Module provides a simple way to deliver images, PDF files, or other binary content from a database to your Perspective clients or other web applications. Without needing the WebDev module. All you need is a Named Query that has appropriate security settings and returns a single row with two columns: Content, and ContentType. Modest documentati…

---

_[View the full topic](https://forum.inductiveautomation.com/t/pdf-viewer-perspective-with-document-as-bytes/79108)._
