Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Good day, everyone
I am trying to print my webpage/mashup, (an image just for now).
Following this article guide: https://www.ptc.com/en/support/article/CS319138
I wrote the below in a service and I invoke this service on a button click with the hopes of getting the print page to open up (Like how it would when you press Ctrl+P).
This isn't working. Is there something I am missing?
The code:
let table = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "dataShape_DS"
});
let html = "window.open('http://xx.xx.co/:port/Thingworx/MediaEntities/Icon'); html.print()";table.AddRow({htmlColumn:html});
result = table.htmlColumn;
Solved! Go to Solution.
I have tested in my local and it's working fine with value display. I tried as follow,
<button onclick="let WindowReferenceObj = window.open('http://localhost:8080/Thingworx/MediaEntities/AcknowledgeAlertIcon'); WindowReferenceObj.print();">Print</button>
result = me.html_property
I have tested in my local and it's working fine with value display. I tried as follow,
<button onclick="let WindowReferenceObj = window.open('http://localhost:8080/Thingworx/MediaEntities/AcknowledgeAlertIcon'); WindowReferenceObj.print();">Print</button>
result = me.html_property