Is the HTMLCOMPONENT threadsafe?

The html component seems to falter when multiple threads are generating PDFs with html content in them. There are random formatting errors which creep in - these are things like some text will be much larger than the rest, or boldened, or smaller, etc. Is this a known issue? Any workarounds?

I've tried to use the Text Field and set the markup to HTML, and that gets rid of these issues HOWEVER it limits how much styling can be applied. Simple things like tables for example can't be used.

Suggestions welcome.

umair.hl's picture
Joined: Nov 8 2016 - 2:52am
Last seen: 6 years 1 month ago

3 Answers:

HTML component isn't officially supported by all of JasperReports products because it has some problems.

If you want tables, can't you just use the table component? There's also Custom Visualization component that can be used to generate SVG pages - I prefer using this.


hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago

Hi hozawa

I'm hesitant to use other components because our system has been built to accomodate users editing HTML, and that HTML is then fed through to the HTML element while creating PDFs. Obviously this is failing at large scale - when we have multiple threads creating PDFs.

Do you know what the causes are behind why the htmlcomponent doesn't work? Any pointers if we wanted to fix it or build our own htmlcomponent? Other alternatives?


umair.hl's picture
Joined: Nov 8 2016 - 2:52am
Last seen: 6 years 1 month ago

Facing the same issue with size and large content... in the htmlcomponent jar. Any workaround please.Thanks in advance

vineethhegde68's picture
Joined: May 25 2022 - 3:48am
Last seen: 5 months 3 weeks ago