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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

print widget extension

AP_10343008
15-Moonstone

print widget extension

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.

 

7 REPLIES 7

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 

AP_10343008
15-Moonstone
(To:nmutter)

@Velkumar  @nmutter 

When iam clicking print button, i want some containers to be hided and when iam coming back from print to normal page, i need the hided containers to be shown again!! How we can trigger event when we closing print page ???

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.

AP_10343008
15-Moonstone
(To:Velkumar)

Then print page will come like a popup inside mashup. It wont work i guess.

slangley
23-Emerald II
(To:AP_10343008)

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

 

 

Announcements


Top Tags