IFrame Printer

Stable version 1.0.0 (Compatible with OutSystems 11)
Published on 17 Oct by 
 (0 ratings)

IFrame Printer

Sending the content of a Reactive web page to the print dialog after it is "fully loaded" is not straight-forward, due to the async nature of the underlying technology. This component contains WebBlocks that facilitate printing the content of a RWA page within another RWA page, using an iFrame and component-mount JS event.
Read more

Normally for TWA (Traditional Web Application - .aspx) pages, printing its content can be done by loading the printable into a hidden iFrame and wait for it to be fully rendered. Afterwards, the JS function to open the print dialog is triggered. This can be accomplished by using "JS onload" event, and we would call the print function in that iframe.onload.

This approach doesn’t work with RWA pages, as they work with async calls and the real "render finish" of the page is not detectable by the iframe.onload event.

So instead of the iframe.onload event, we use the componentDidMount JS event approach.

This method works well if we can check if the last item that needs to be loaded on the page is known to us (e.g. a list with many items).

What’s new (1.0.0)
Reviews (0)