[Html 2 Image Mobile] Is there any possibility for this feature to support Offline Mode?
Forge component by Romel Guerra
Application Type
Mobile

Hello,


As mentioned in the title, I was trying to capture the Div on the screen and make it into base64 and append the base64 into the PDF generation. But when I tested it offline, it doesn't work. Any advice on how to make it works in Offline Mode? Appreciate any advice offered.


Regards,

Kenny

Solution

Hi Kenny,

As HTML to Image Mobile uses server actions to split the string and to convert from base64ToImage, so you need to replace that with client actions. Then it will work in offline mode as well. Something like below. Please find the attached OML file for more details.


Cheers,

Dileep 

Html2ImageMobile.oml

Hi Dileep, 


Thanks for the solution! Indeed I missed out on the server action part under this Forge. However, the attached seems broken and I couldn't download it. I did replicate the String_Split action with JS (I'm new to JS) and not sure how to output the result from split() into a text record list. My current solution is to capture the .List[1] only to get my job done. And it seems like it's working like a charm! 

Thanks again for the solution and would be very appreciated to know how to get the String_Split client action with having a text record list as an output for further understanding on OutSystems.


Regards,

Kenny


Edit: Seems like the attachment is downloadable now. I'll replicate it from there. Thanks!

Capture.JPG

Hello Kenny,

You can use the following component for such scenario:-

https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=6749

and see the below thread for reference which is a similar problem as yours:-

https://www.outsystems.com/forums/discussion/52239/howto-want-to-create-pdf-in-mobile-app-from-local-entity/


Thanks,

Krunal


Hello Krunal, 

Thanks for the proposed solution. I tested with this component and found it doesn't support my scenario which needs a custom layout. I used another component to get my task done by converting the HTML to Base64/Binary and append it into the custom layout.  Thanks again.


Regards,

Kenny

Solution

Hi Kenny,

As HTML to Image Mobile uses server actions to split the string and to convert from base64ToImage, so you need to replace that with client actions. Then it will work in offline mode as well. Something like below. Please find the attached OML file for more details.


Cheers,

Dileep 

Html2ImageMobile.oml

Hi Dileep, 


Thanks for the solution! Indeed I missed out on the server action part under this Forge. However, the attached seems broken and I couldn't download it. I did replicate the String_Split action with JS (I'm new to JS) and not sure how to output the result from split() into a text record list. My current solution is to capture the .List[1] only to get my job done. And it seems like it's working like a charm! 

Thanks again for the solution and would be very appreciated to know how to get the String_Split client action with having a text record list as an output for further understanding on OutSystems.


Regards,

Kenny


Edit: Seems like the attachment is downloadable now. I'll replicate it from there. Thanks!

Capture.JPG

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.