5
Views
1
Comments
Solved
[Html 2 Image] How do properly use this Html2Image module?
Forge component by Romel Guerra
3
Published on 14 Jan 2020
Application Type
Reactive

Hello,

I'm trying to use this module in my personal environment and I cannot seem to get it to work. I'm not sure what the issue is. I wasn't having much luck in getting it to work, so I started stepping through the Html2Image module using my app as the entry module. When I step through the code in the step debugger, I keep getting the following error:

It appears to be doing this after the HtmlToCanvas JavaScript node in the Html2Image Client Action. After doing this enough times, it appears to cause my personal environment to crash. See below:

I have to go through the following steps to get my personal environment up and running again: https://success.outsystems.com/Support/Personal_Environment/Personal_Environment%3A_Service_Unavailable_-_HTTP_Error_503

I am calling the Html2Image client action inside of the PrintOnClick action inside the Menu block. For the inputs to the action, I am leaving the image type as blank, so I believe PNG is being picked for the image type. For the ContainerID, I am passing in "thisContainer" which is the name of the container that I am trying to convert. Here is the widget tree and properties for the container I am trying to convert:

Am I doing something wrong? Any ideas as to why I'm seeing this error? I have attached my module for you to review.

Thanks in advance and please let me know if you need additional info!

Playground.oml

Rank: #119
Solution

Hello Ethan,

Hope you're doing well.

I was checking your code and it seems that you're just missing the Download widget in your logic.

In your PrintOnClick client action, you should replace your End node by a Download node, like this:

where the File Content is:

Html2Image.Image


I installed your OML file in my personal area and it seems to be working as expected. You can try it out:

https://rbarradas.outsystemscloud.com/Playground/printing__1


Hope that this helps you!


Kind regards,

Rui Barradas