Use XSL FO file to build PDF using iText

I have a requirement to convert graphics (Java2D objects) and some tables to PDF. I also need the PDF to be interactive. Given these requirements, I came to the conclusion that I should use iText for this purpose. Now I also need to provide the ability to build the file using XSL FO. I know that Apache FOP provides the ability to render PDF using XSL FO, but it does not support adding annotations (e.g. comments, links).

Is there a way that I can do this (layout using XSL) with iText?
It would be useful even if I use both libraries and perform this task.

+6
source share
1 answer

No, iText is not an XSLFO processor. Therefore, it is not possible. However, you can first generate the PDF through the FO processor, for example (Apache FOP or RenderX XEP), and in the second step, process it using iText to add annotations like comments.

0
source

All Articles