fop or itext for java to pdf generation

T

Tim

Hi

Can anyone comment on the pros and cons of fop (using xml) or itext
(java lib) for generating pdfs from a java programme. My requirements
are to produce a "glossy" hi-fidelity brochure type pdf of approx 50
pages in length. The source data for the report will be pulled out of a
database and will consist of text and graphics. I need to be able to
use page numbering and use a "table of contents" in the pdf.

Are there other tools suitable for doing this. I don't mind paying for
the right product,

Any help appreciated,

Tim
 
I

Ingo R. Homann

Hi Tim,
Can anyone comment on the pros and cons of fop (using xml) or itext
(java lib) for generating pdfs from a java programme. My requirements
are to produce a "glossy" hi-fidelity brochure type pdf of approx 50
pages in length. The source data for the report will be pulled out of a
database and will consist of text and graphics. I need to be able to
use page numbering and use a "table of contents" in the pdf.

Are there other tools suitable for doing this. I don't mind paying for
the right product,

I didn't use FOP really (I only tried it and it somehow did seem
unsuitable to me), but I am using iText for quite a while.

I think, iText will work for what you want to do, although a table of
contents is a bit tricky and concerning this, there are some
disadvantages, IIRC (I think, the number of pages reserved for the table
of contents has to be fixed in advance or something like that).

Further disadvantages of iText are:
- No RowSpan for PdfPTables (IIRC, normal Tables can do Rowspan, but
they have some other disadvantages too (Borders?))
- No relative sizes esepcially for images and tables (absolute to
relative widths and heights have to be calculated manually)
- weak support for page breaks / no-page-break

As you see, the disadvantages are only important when you want to do
"advanced" things.

At all, I think, iText is a very good package when you want to generate
PDFs.

Ciao,
Ingo
 
R

Raymond DeCampo

Tim said:
Hi

Can anyone comment on the pros and cons of fop (using xml) or itext
(java lib) for generating pdfs from a java programme. My requirements
are to produce a "glossy" hi-fidelity brochure type pdf of approx 50
pages in length. The source data for the report will be pulled out of a
database and will consist of text and graphics. I need to be able to
use page numbering and use a "table of contents" in the pdf.

Are there other tools suitable for doing this. I don't mind paying for
the right product,

The TeX or LaTeX systems, available on many Unix systems (I think MikTeX
is Windows) is designed for creating such complex documents. Knuth
wrote the original TeX so that he could create his classic textbooks.

Ray
 
A

Andrew

Hi Tim,

Tim said:
Can anyone comment on the pros and cons of fop (using xml) or itext
(java lib) for generating pdfs from a java programme. My requirements
are to produce a "glossy" hi-fidelity brochure type pdf of approx 50
pages in length. The source data for the report will be pulled out of a
database and will consist of text and graphics. I need to be able to
use page numbering and use a "table of contents" in the pdf.
Are there other tools suitable for doing this. I don't mind paying for
the right product,

I've used Apache FOP for doing something similar to what you describe -
producing (shorter) glossy flyers dynamically. My experience suggests that
using XSL:FO allows you to have a much finer-grained control over the layout
and presentation of your PDF output than a tool like iText can provide. Think
things like text leading, kerning, font sizes, colourings, indentation,
page and area margins etc.

Having said that, bear in mind that Apache FOP does not currently implement the
full scope of XSL:FO capabilities (<http://xml.apache.org/fop/compliance.html>
has more details of what the current implementation of FOP does support).
You'll need to decide whether it's missing any key areas of functionality that
you think you'll need for your project. If it is lacking, there are much more
feature-complete commercial XSL:FO engines available, but of course these cost
significant $$$.

Page numbering is very easy with FOP. I haven't created anything more than a
simple table of contents, but they are certainly part of the XSL:FO spec, and
at least some support is implemented in FOP (but beware of memory limitation
issues if you have a large document and lots of forward references, which a
table of contents implicitly requires).

Overall, I was very satisfied with XSL:FO and FOP. Occassionally I had to
creatively work around some limitations, but these were more in the category of
minor hassles than major headaches or showstoppers.

Good luck with the project!

Cheers,
Andrew
 
S

Steve Sobol

Andrew said:
I've used Apache FOP for doing something similar to what you describe -
producing (shorter) glossy flyers dynamically. My experience suggests that
using XSL:FO allows you to have a much finer-grained control over the layout
and presentation of your PDF output than a tool like iText can provide. Think
things like text leading, kerning, font sizes, colourings, indentation,
page and area margins etc.

It's wonderful. http://JustThe.net/legal/tos/ contains a form whose target
is a Java servlet that takes the information from the form, plugs it into
the appropriate places in an XML template, and renders it all via XSL:FO
(and FOP). Only thing is, it's a tad sluggish (note that my web page says
10-15 seconds to render the page). But other than that, it works *really*
well. And FO does allow you a good bit of control over what goes where.
Page numbering is very easy with FOP. I haven't created anything more than a
simple table of contents, but they are certainly part of the XSL:FO spec, and
at least some support is implemented in FOP (but beware of memory limitation
issues if you have a large document and lots of forward references, which a
table of contents implicitly requires).

I can offer some source code if people are interested :)

--
JustThe.net - Steve Sobol / (e-mail address removed) / PGP: 0xE3AE35ED
Coming to you from Southern California's High Desert, where the
temperatures are as high as the gas prices! / 888.480.4NET (4638)

"Life's like an hourglass glued to the table" --Anna Nalick, "Breathe"
 
T

Thomas Weidenfeller

Raymond said:
The TeX or LaTeX systems, available on many Unix systems (I think MikTeX
is Windows) is designed for creating such complex documents. Knuth
wrote the original TeX so that he could create his classic textbooks.

TeX is available for almost every OS. If the OP is looking for some
native Unix formatter/typesetter, than that would be troff plus some
troff macro library. The GNU version of troff - groff - has been ported
to an number of non-Unix platforms, too, including Windows.

Early versions of troff were written in (PDP-11?) assembler, later ones
in C. groff is written in C++.

/Thomas
 
T

Tim

thanks for the info. It looks like there hasn't been a realse of fop
for sometime. I'm a little concerned that the project has "ground to a
halt". Anyone know if a new release is likely soon?

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top