cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Related to Button widget

SOLVED
Highlighted
Regular Member

Related to Button widget

Hi,

I am having the requirement like this.

I am having the pdf file with me.I want to create one button for that pdf.whenever i  click on that button beside that i want that pdf file.I already tried this with button but pdf is embedded in button it wont displays

Thanks,

karthik

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Related to Button widget

If you want the PDF to be displayed in the same mashup beside the button, follow the article to use a WebFrame, as mentioned in the above post.

If you want to open PDF in a new window or download it, then you can use a Link widget. Set its visible property to false. Bind the Clicked event of button to the Navigate property of the Link widget and specify the URL to the PDF directly in the LinkURL property or bind a value to it using a service.

 

If the PDF is available in a TWX FileRepository, then

1. Use below URL format if you want to open PDF in a browser window

https://[TWX_HOST]:[TWX_PORT]/Thingworx/FileRepositoryDownloader?download-repository=[REPOSITORY_THING_NAME]&directRender=true&download-path=[PATH_TO_FILE].pdf 

 

2. Use below URL format if you want to download PDF upon clicking button
https://[TWX_HOST]:[TWX_PORT]/Thingworx/FileRepositories/[REPOSITORY_THING_NAME]/[PATH_TO_FILE].pdf 

View solution in original post

3 REPLIES 3
Highlighted

Re: Related to Button widget

Highlighted

Re: Related to Button widget

If you want the PDF to be displayed in the same mashup beside the button, follow the article to use a WebFrame, as mentioned in the above post.

If you want to open PDF in a new window or download it, then you can use a Link widget. Set its visible property to false. Bind the Clicked event of button to the Navigate property of the Link widget and specify the URL to the PDF directly in the LinkURL property or bind a value to it using a service.

 

If the PDF is available in a TWX FileRepository, then

1. Use below URL format if you want to open PDF in a browser window

https://[TWX_HOST]:[TWX_PORT]/Thingworx/FileRepositoryDownloader?download-repository=[REPOSITORY_THING_NAME]&directRender=true&download-path=[PATH_TO_FILE].pdf 

 

2. Use below URL format if you want to download PDF upon clicking button
https://[TWX_HOST]:[TWX_PORT]/Thingworx/FileRepositories/[REPOSITORY_THING_NAME]/[PATH_TO_FILE].pdf 

View solution in original post

Highlighted

Re: Related to Button widget

Hi @karthik2.

 

If one of the previous responses allowed you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community!

 

Regards.

 

--Sharon

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!