Skip to main content
12-Amethyst
June 18, 2018
Solved

Viewing a PDF file stored in a network share

  • June 18, 2018
  • 2 replies
  • 2879 views

In a PoC I'm faced with following Use Case:

For a internal application I need to view PDF files which are stored on a network share.

It is possible to open the file in a browser window by entering something like:

file://///servername/share/Loremipsum.pdf

When using this as the URL for a Webframe widget, the widget won't display anything. Even a Link will not open a new window.

There are no entries in the application.log.

Any ideas how to get access to a locally stored PDF and present that to the user?

What will be the best architecture for this?

Best answer by OCMutz

Hi,

thanks for the Information, but copying all the files to the Thingworx repository would create a set of redundant data, which would be not acceptable in the PoC.

Finally I created a context in the Thingworx Tomcat that is redirected to the Network share. This is working quite well.

2 replies

13-Aquamarine
June 21, 2018

Place the pdf into a ThingWorx file repository. Then, the input "URL" for the web frame widget would look like this: http://<host:port>/Thingworx/FileRepositoryDownloader?download-repository=<YourThingWorxRepository>&directRender=true&download-path=/your_pdf.pdf 

OCMutz12-AmethystAuthorAnswer
12-Amethyst
June 23, 2018

Hi,

thanks for the Information, but copying all the files to the Thingworx repository would create a set of redundant data, which would be not acceptable in the PoC.

Finally I created a context in the Thingworx Tomcat that is redirected to the Network share. This is working quite well.