PDF viewer perspective with document as bytes

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: