How do I set the HTML element in JasperStudio to stretch to the size of the source?

I have been looking for this answer for about a week now but I cannot find anyone who specifically addresses this issue. At the moment, I am trying to import html from a file into a Jasper Report using the HTML element and a custom data source. I am using this element because unlike the text field, it can render images.

The text field has a great feature where it will resize if you set it to "stretch with overflow."

However, the HTML element does not do this...instead it clips anything that would render outside the specified element size. Is there a way to dynamically stretch the size of the HTML element in a similar way to the text field?

Also, side question but related....The HTML element renders more like a jpg when exporting the report in PDF format....this basically means that it tries to fit the entire thing into the fram of the element and it ends up squishing everything down. Is there a way to stop this from happening the way that it renders when you export to HTML is much more appropriate, the only problem being the one mentioned above...


michael.f.pascoe's picture
Joined: Jan 28 2014 - 1:30pm
Last seen: 6 years 11 months ago

1 Answer:

Hi Michael, the HTML element is not designed to render complex html, and it looks like you are trying to use it to do much more than is actually supported.

The HTML element does not stretch, and in many case the output in no-HTML export formats is not good, and its usage is discouraged.


giulio's picture
Joined: Jan 2 2007 - 4:15pm
Last seen: 1 week 5 days ago