0
votes

I am working on generating AFP files using Apache FOP(v2.1) and Thymleaf.

I have added border-radius attribute in some sections of the document to get curve borders. But those sections are not stable. Sometimes they show background-color , sometime not. The margins are not coming properly for some requests.

Below code snippet used to get border-radius on table in AFP file

    <fo:table table-layout="fixed" width="100%" margin-top=".25in"
border-collapse="separate" background-color="#e7e7e7" border-style="solid"border-width="0.05mm" border-color="#e7e7e7" fox:border-before-end-radius="7pt"fox:border-before-start-radius="7pt">

I got nothing till now from googling the issue.

Does anyone faced this issue and help me out .

1

1 Answers

0
votes

The reason for unstability was not due to border-radius . After much of research and debugging , it was found that the fopFactory object was a singleton bean which was using internal caching , hence anomalous behaviour for multiple properties.

Solution: Tried multiple ways to prevent internal caching but none of them were helpful. Finally I had to create the fopFactory object for every document generation.

Any suggestions are much appreciated.