fop or itext for java to pdf generation

Discussion in 'Java' started by Tim, Jul 13, 2005.

  1. Tim

    Tim Guest

    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
     
    Tim, Jul 13, 2005
    #1
    1. Advertising

  2. Hi Tim,

    Tim wrote:
    > 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
     
    Ingo R. Homann, Jul 13, 2005
    #2
    1. Advertising

  3. Re: [OT] fop or itext for java to pdf generation

    Tim wrote:
    > 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

    --
    XML is the programmer's duct tape.
     
    Raymond DeCampo, Jul 13, 2005
    #3
  4. Tim

    Andrew Guest

    Hi Tim,

    "Tim" <> writes:

    >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
     
    Andrew, Jul 14, 2005
    #4
  5. Tim

    Steve Sobol Guest

    Andrew wrote:

    > 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 / / 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"
     
    Steve Sobol, Jul 14, 2005
    #5
  6. Re: [OT] fop or itext for java to pdf generation

    Raymond DeCampo wrote:
    > 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


    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
     
    Thomas Weidenfeller, Jul 14, 2005
    #6
  7. Tim

    Tim Guest

    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
     
    Tim, Jul 15, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris

    iText HTML->PDF Problems

    Chris, Apr 16, 2004, in forum: Java
    Replies:
    2
    Views:
    7,082
    Chris
    Apr 19, 2004
  2. Daniel

    pdf-forms using iText

    Daniel, Jun 9, 2005, in forum: Java
    Replies:
    0
    Views:
    507
    Daniel
    Jun 9, 2005
  3. Jack
    Replies:
    0
    Views:
    823
  4. Pablo
    Replies:
    0
    Views:
    955
    Pablo
    Mar 28, 2007
  5. Toni Pohl
    Replies:
    1
    Views:
    951
    Toni Pohl
    Aug 10, 2008
Loading...

Share This Page