I am using FOP api with XSL to generate the PDF.
My requirement is to write some text on top of a background image. Any possible way suggested will be helpful.
I am using FOP api with XSL to generate the PDF.
My requirement is to write some text on top of a background image. Any possible way suggested will be helpful.
You can use the background-image
property:
<fo:block background-image="image.png">Lorem ipsum.</fo:block>
You can control repetition and position of the image using background-repeat
, background-position-horizontal
and background-position-vertical
:
<fo:block background-image="image.png" background-repeat="no-repeat">Lorem ipsum.</fo:block>
<fo:block background-image="image.png" background-repeat="no-repeat" background-position-horizontal="center">Lorem ipsum.</fo:block>