I have an app that needs to pull an page from an Rest API (file type of either HTML or PDF) and be able to print it. Unfortunately, there does not seem to be a method of saving file outputs from API calls – leading to my dilemma. Is there a reasonable way to get the page information into Tulip and then print? We are writing the Rest API interface, so we can make changes on the API backend.
I was thinking of maybe converting the HTML to plain text, sending that along as a text return, but am unsure how to get this into a printable format in tulip easily.
I thought about just injecting the plain text into the HTML section of the custom widget and rendering it on screen to print, but it appears that the print system dialog option in tulip is scaled to the tulip application screen. Since we are hoping to print a normally sized page, this seems unideal.
What I assume would be the best would be to open a browser rendering the HTML plain text that was transmitted, allowing us to print with the browser’s dialog. That said, I was unable to find something like this in tulips community widgets and am a little uncertain about the complexity of making something like this.
I appreciate any insight you can provide!