• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

iText in Action: Better than DocBook XML?

 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruno,

I've worked for several month with DocBook XML which does a perfect job. All images I could see in your Sample 1 chapter can be easily done with DocBook XML and its DocBook XSL library.

But I'm not closed to iText .

What benefits do I have using iText and not DocBook XML?

Regards,
Darya
 
author
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Darya Akbari:
What benefits do I have using iText and not DocBook XML?



If I were you, I'd stick to DocBook XML as the source format for creating your PDFs. DocBook is an XML standard; iText also has (limited) XML2PDF functionality, but it's more suited in cases where you have custom XML, or when there's no XML involved at all.

For instance: at Ghent University, we have to generate a lot of large documents from a database with thousands of records. We have 27,000 students, and every year the database grows with about 250,000 curriculum records, one for each course following by these 27,000 students.
These documents are generated online, in a web application. Generating an XML file with such a large amount of data, and then converting this XML to PDF is very expensive in CPU, memory, and time. We can't afford this; especially in the short period between the examination of the last student and the proclamation of the results of the first student, we need to produce hundreds of thousands of pages. This is a very stressful period for all the administrators involved. They want their 100 page grading/deliberation/proclamation lists in a few seconds, not in a few minutes. That's when iText is at its best.

With DocBook, you can create a document that has hundreds of pages, but I assume that time isn't a critical element. I also assume that you don't need real PDF functionality, like Optional Content, forms, digital signatures,... You are just using PDF because it's a nice format for printing. But PDF is more than just that.
You could keep DocBook XML as the source to create your PDF (with another tool than iText), and use iText for post processing: to add encryption, to concatenate/split/burst PDFs, to sign a PDF document (digitally), to add a watermark,...
 
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bruno Lowagie:

... and use iText for post processing: to add encryption, to concatenate/split/burst PDFs, to sign a PDF document (digitally), to add a watermark,...



That's great...sorry if I sound like a tell-sell presenter
for something I've never used. But iText seems to bundle what
we've tried to achieve without the luxury of an api.

But what about the licence of iText, can it be used freely in
commercial products?

Kind regards,

Gian
 
Bruno Lowagie
author
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gian Franco Casula:
for something I've never used.


When I started answering the questions on this forum, I was very surprised.
I am used to technical questions on the iText mailing list, but here people are asking me to compare iText with products that are IMHO beyond comparison.
It's like asking somebody to explain the difference between a Rolls Royce and a Formula 1 car. Both are cars, but they serve a completely different purpose. You don't buy a Formula 1 car to drive through town; you won't win a Grand Prix with a Rolls Royce Phantom ;-)

Originally posted by Gian Franco Casula:
But what about the licence of iText, can it be used freely in
commercial products?


iText is distributed under the Mozilla Public License (MPL) with LGPL for backward compatibility. There is no purchase price, no license fee; you only have to follow what the MPL says.
An example of a commercial product that uses iText is ICEBrowser from ICESoft. Have a look at the paragraph under 'Easily Convert HTML pages to PDF documents in Java using ICEbrowser SDK & iText' on this page: http://www.icesoft.com/products/icebrowser_deploy.html
I like companies that use iText like this, and at the same time promote the product.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response Bruno .

Regards,
Darya
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I use DocBook for generating different formats (JavaHelp, PDF, RTF) with
DocBokk XSL.
But DocBook XSL first creates FO and then needs an FO processor
for generating PDF. Unfortunately, the FP generated by DocBook XSL and the
Apache FO processor do not fit well.

I hoped there would be kind of (simplified) DocBook to iText.

Klaus
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Klaus,

I have perfect results when working with DocBook. What really matters is the toolchain which you need to find out to pipe your DocBook XML document through.

What I can recommend to you is to use Saxon and the latest FOP trunk as your toolchain.

This with the DocBook XSL library from Bob Stayton will be the perfect fit.

Good Luck,
Darya
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Klaus,

Welcome to JavaRanch , by the way.

Regards,
Darya
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic