Skip to main content
18-Opal
June 5, 2025
Solved

HTML Text Area - Print Button

  • June 5, 2025
  • 1 reply
  • 910 views

Hi, 

 

We have a request to be able to print the page when a button on the Thingworx Dashboard is pressed. 

 

I was checking, if possible, with the HTML Text Area widget, I was trying with below code and it was not working:

<!DOCTYPE html>
<html>
<head>
<title>Print Page Example</title>
</head>
<body>
 
 <h2>This is a sample printable page.</h2>
<p>Click the button below to print this page.</p>
 
 <button onclick="window.print()">Print This Page</button>
 
</body>
</html>


Thingworx Version: 9.7

Thanks,



Best answer by pshashipreetham

Hi @Rocko 

 

Tried everything, nothing worked. According to the use case, I need to insert it into the HTML Text Area, which is currently not possible.

 

I found a workaround using the value display widget.

 

Thanks,

1 reply

Rocko
19-Tanzanite
June 5, 2025

Have you considered a search on PTC support? Many articles are available on this topic.

https://www.ptc.com/en/support/search/#q=print%20mashup

 

pshashipreetham18-OpalAuthorAnswer
18-Opal
June 5, 2025

Hi @Rocko 

 

Tried everything, nothing worked. According to the use case, I need to insert it into the HTML Text Area, which is currently not possible.

 

I found a workaround using the value display widget.

 

Thanks,

Rocko
19-Tanzanite
June 5, 2025

HTML Text area is mainly for text display - you can't put active components or JS in there, it will be filtered out.