PDF Viewer with PDF stored locally

Hello again!
I am trying to set up a pdf viewer but I am getting a failed to load PDF File. I have the PDF file saved locally on the same pc that the gateway is hosted on. No matter how I enter the file path it gives me the error. I've read on other topics about the use of a Web Dev resource, is this required if my pdf is stored locally?
Here is how I have my filepath in the source property.

C:/Users/hmi_support/Desktop/P&IDs/Davis%20P&ID.pdf
I've also tried it this way as well
C:\Users\hmi_support\Desktop\P&IDs\Davis P&ID.pdf

Yes. Browsers don't allow direct access to local files.

Thank you for the quick reply!

I installed the web dev module and set up my file. However when I copy the mounted path to my pdf viewer source I still get the same error.
Tried this as i saw previous topic encounter the same error as me but it did not fix it for me.

http://localhost:8088/system/webdev/Edge/Davis%20P&ID.pdf

@pturmel’s BlobServe module handles PDF files.

1 Like

The gateway service needs to have access to the folder where you placed files. The LOCAL_SYSTEM account that is the default for services in Windows has limited access outside of install folders.

The ampersand in the URL would certainly need to be encoded, too.

1 Like

Not sure if this is a known issue or not, but I changed the name of the orignal PDF when I imported it to the gateway the first time. I deleted and reimported and this time I didn't rename it. This let the PDF open correctly.

1 Like

Sounds to me like your new file name simply had invalid characters for a URL. Those need to be encoded, like you did for the space. It isn't a bug.