Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I need a print widget extension which takes "mashup entity" as input.
I found some print widgets which takes screenshot of the current page. As scroll bar appears in mashup to see all the rows in collection widget, taking screenshot wont help. So we need a print extension which takes input as mashup, so that we can pass new static mashup in print widget to take print out.
Hi @AP_10343008
Check this extension
Community Post :
Re: PDF Download using thingworx - PTC Community
/VR
If you need a "widget" to be used in a mashup (that's how I read your post) you can have a look at https://community.ptc.com/t5/ThingWorx-Developers/Taking-screenshot-and-downloading-the-page/m-p/873613/highlight/true#M62256 who created a widget to trigger the "print" function in the mashups. Linking to github: https://github.com/Velkumar10/ThingworxPrintWidget
Hi @AP_10343008
I think we don't have the functionality to check print dialog box close event in Thingworx.
As a workaround, you can create a separate mashup with the container closed/removed. Whenever a print button is clicked opens a Thingworx popup with a modified mashup and from there user can take a print. The only disadvantage is user has to click the print button 2/3 times.
/VR
Yes, I would also go with a separate "print-mashup".
If someone would really want to he could extend the extension to subscribe to "afterprint"-event and provide a callback via the widget. Then you could hide and show some elements before / after you print.
Then print page will come like a popup inside mashup. It wont work i guess.
Hi @AP_10343008.
Another approach would be to write your own application external to ThingWorx for viewing/printing the data and use a ThingWorx service for populating the data in your app. This could be a web page, etc. that could trigger pulling the data upon request. You just need to be able to make an API call back to ThingWorx.
There are other approaches as well, but without knowing more about your use case, we'll stop with this one.
Regards.
--Sharon