Any way to receive and render PDF files or HTML files from connectors?

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!

Huh, custom widget for printing in my brain sounds like it would work. FWIW :slight_smile:

Maybe (completely random examples)

I went ahead and was able to implement it without any problem!

That said, I found out too late that style information we retrieve uses references to local files stored on the ERP system we get it from – which would be more painful to retrieve and use than pursuing another alternative route.

The Other Alternative Route
It looks like I will be writing a POST call out of a custom widget and attempt to open the received PDF in a browser. If you know the feasibility of this – possible or not – please let me know!