IFOP2 Component with HTML tags

Hi everyone,

I’m trying to use the ifop2 component to render a text that is formatted with html tags but somehow this doesn’t works the way I expect.

When the text has no html tags, the component is able to render the text properly. But when the text has a tag like
, the printing form (I’m using com.softwareag.cis.server.adapterlistener.PDFFOPListener) either doesn’t load at all or it renders blank.

Is this component supposed to render the text with html tags, or should I use another component? I didn’t find enough documentation or examples for this component.

Thank you all.

Hi Oscar,

NJX uses Apache FOP. Apache FOP offers 2 attributes to treat whitespaces and linebreaks. If is used as linebreak instead of
and the following attributes are set on a fo:block element, the linebreaks are done as intended.
white-space-collapse="false" linefeed-treatment="preserve"

Unfortunately these attributes are not part of the currently offered NJX style attributes.
This means it requires a product modification of NJX to support them. If this is important for you, please add a corresponding Support Request.

Am I correct that you found a workaround - adding fo:block Elements for each linebreak? Could you please share your experience with your solution?

Thanks + Best Regards,
Christine

Hi Christine,

Indeed, we have found a workaround by adding the fo:block element:

EXAMINE SI-U-AYUDAS.TXT-AYUDA FOR H'0D0A' REPLACE '&#160;<br/><fo:block/>'

In this case, on my main page I’m using a TEXTOUT component that interprets the
tag but not the space and the fo:block. The opposite happens with the IFOP2 component in the printing form, which ignores the
tag. This way I’m able to have the same styling on both pages.

So far this is enough in order to achieve what I wanted to, so no product modification will be needed yet.

Thank you so much for your reply.

Best Regards!