PDF viewer perspective with document as bytes

Hi, I have a project and the document management is in a shared disk, the .conf is already configured to view the documents, I already have the functionality to insert the documents, and now I need to read them and show them in the PDF viewer, I can see the document with the function "readFileAsBytes" but it marks a configuration error in the PDF.

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: