are there any way to send a pdf file to a custom widget?

0
are there any way to send a pdf file to a custom widget? I have to print a report pdf file that was generated by microflow and template. I mean a pdf file as an input for that custom widget or maybe are there the way to convert pdf file to an image object in mendix? so i might be able to convert it to an unlimited string
asked
2 answers
0

Hi Pasit,

You can take a look at how the document viewer widget works. 

https://appstore.home.mendix.com/link/app/12/Mendix/Document-Viewer

answered
0

Here's what I would do: make a non-persistent entity that is generated through a microflow. This microflow takes in the PDF and convert it to a base64 encoded string, adding this string to a string attribute in the non-persistent entity. The Community Commons module has a method like that, as far as I know.

That string could be used by a custom widget to send it to a thermal printer.

answered