Skip to main content

1 reply

16-Pearl
March 15, 2019

Hello Shalini,

 

Thank you for posting to the ThingWorx Developer section of the PTC Community.

 

In doing some research regarding your request I have found that it should be possible to load a PDF via a webframe provided the PDF is in a ThingWorx Repository.

 

You would simply need to set the Input URL for the Webframe Widget to something like the following: http://<host:port>/Thingworx/FileRepositoryDownloader?download-repository=<YourThingWorxRepository>&directRender=true&download-path=/your_pdf.pdf

 

With respect to Excel or other Office documents specifically we do not have anything out of the box that would allow a preview of these files on a mashup. This may be possible with some sort of customization but I cannot speculate on how this would be accomplished.

 

As you may have noticed when Office files are accessed in Web Browsers they are always presented to be downloaded prior to opening. This is typically for security purposes given that macros or other malicious code can be encapsulated in these files.

 

Hopefully this helps.

 

Regards,

Tyler Misner

Technical Support Engineer

1-Visitor
March 18, 2019

Hi @tmisner,

Thanks for your response. Based on your inputs I have given the port number and TW repository to be system repository (folder inside the ThingWorxStorage folder). Is this right? And for pdf file what if I need to browse the path and then preview it without directly giving the pdf name?


http://localhost:8089/Thingworx/FileRepositoryDownloader?download-repository=SystemRepository&directRender=true&download-path=/your_pdf.pdf

16-Pearl
March 18, 2019

Hello again svisveswaraiya,

 

This would seem to be correct. Have you tested accessing that URL after setting it?

 

Can you clarify further what you mean by "And for pdf file what if I need to browse the path and then preview it without directly giving the pdf name?"

 

Are you asking about how you could link to the PDF without displaying the full link? Clarification is needed here.

 

Regards,

Tyler Misner

Technical Support Engineer