Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing PDF files in Java

 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Sorry for double posting this thread but I figured it would be more appropriate in this category.
I was wondering if someone might be able to point me in the right direction. I need to generate PDF files from XML. These PDF files are format intensive. Does anyone know of what API I should use to achieve this. I was also wondering if anyone has used a program to take a PDF file and transform it to a Formated Object(FO) since this would save me a ton of time not writing my own style sheet myself. I'm guessing I'm going to want to use an XSL-FO style sheet to transform my xml to a PDF document.
Any help would be appreciated.
Cheers
Ryan
 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lasse,
Thanks for the quick response. I have already looked at 3/4 of the list you provided. Have you ever used any of these libs before? Would it be easier to use XSL-FO? Do you know of any software that is available to generate a FO out of a PDF file?
Regards,
Ryan
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried iText and Retep some two years ago, I think. iText was OK, if I remember correctly. I didn't manage to get Retep working correctly due to some environment conflicts (I was developing on a remote Linux box with not-quite-the-latest JDK version etc).
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, forgot the XSL-FO part...
Yes, I think it would be "easier" to generate XSL-FO docs and let the Apache FOP component blurt out the corresponding PDF files. By "easier" I mean that you don't need to be afraid of your PDF library vendor going out of business etc. because your code relies only on a W3C specification (XSL Formatting Objects). However, the XSL-FO approach carries a significant learning curve so from that point of view it's easier to use one of the non-standard Java APIs.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ryan Bailey:

Do you know of any software that is available to generate a FO out of a PDF file?
Regards,
Ryan

There is no such tool.
 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure there are, XSLFast and Scriptura. Just found them yesterday.
[ July 24, 2003: Message edited by: Ryan Bailey ]
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ryan Bailey:
Sure there are, XSLFast and Scriptura. Just found them yesterday.

Well then I understood your question in a different sense.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic