Adding Annotation to Apache Fop

2019-04-28 11:11发布

问题:

I am rendering a PDF using Apache Fop. I am making XSLT templates which I used to convert xml to PDF. I want to put annotation in the output PDF using Apache Fop. I have been searching and it says iText has support for adding annotation to pdf.

Is it possible to add annotation in Apache Fop?

回答1:

iText DOES have support for adding annotations to PDF documents. We use that in our products. You can do the following:

  • Use an existing PDF, for example one that has been created with Apache FOP. You would need to write a Java program that adds annotations to this PDF document.
  • Create the PDF and annotations programmatically using the iText API from XML data (without involving Apache FOP).

I'm not sure though whether this is what you want. iText is no replacement for a GUI application.