Question

I am using PDF documents for various purposes using iText library. Its like one class per PDF document. In a way there are a lot of similarities among the classes and the same have been listed below:

  1. The fields have (x,y) location
  2. The field can be wrapped after some no. of words
  3. A field can have a value which is a function of one or more parameters
  4. Subsequent page of PDF has to kept same or different

I am thinking of doing this layout business through a XML file. Any thoughts or innovative ideas of solving this are welcome.

Was it helpful?

Solution

take a look at PDFBox Library which is now in the incubator of Apache

OTHER TIPS

PDFBox is nice, Used it before and good good help from the developer. You might want to have a look at XSL:FO. It is an XML based formatting language that can output the result as PDF (and other formats) using Apache:FOP.

What about Prince? It's a FOP engine that uses CSS files as styling, and has a Java API. It's not free though (apart from the free Personal License)

Flying Saucer supports using XHTML/CSS to create PDFs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top