Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I implement this in Java or is there something better?

 
Rob Stark
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all, I was recommended to come here by a CS buddy of mine. I want to develop an application that takes simple text inputs and produces a formatted output file, i.e. I already know what the format the output should take, and I want the user to only have to type in the content and not have to worry about the formatting. Ideally this output would be a document (PDF, RTF).

I've seen something like this deployed with Ruby on Rails on a website that works pretty well and produces an HTML page with the formatting applied, so I know it can be done. I'm just not sure what the easiest way is to develop this. My programming experience is relatively novice-to-intermediate with Java, but I do have fairly extensive web development experience in HTML, PHP, CSS (standard stuff), and I'm good at programming overall.

At the moment I bounced around the idea of making an application in Java to do this, but I'm not sure that's the best approach - to my knowledge, it wouldn't be terribly difficult making the UI for taking inputs, but going from those inputs to a formatted document could be nightmarish? I'm not really sure how good Java is at handling that :\

Anyway, any thoughts on this would be appreciated! Thank you!
 
Sudhir Ravindra
Greenhorn
Posts: 16
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you only need formatting as in formatted display and like, go for perl, its the best and was built for such puposes.
However if you need DOC/PDF output then I am not certain how much support perl can give you, better stick to a technology you know of.
For e.g. POI library has support for generation of both formats and you can evaluate how best to achieve the formatting process itself. The formatting support in java is not the best, but should be good enough.
 
vinayak jog
Ranch Hand
Posts: 83
MySQL Database Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done a little work in developing pdf from text. We had used flying saucer library and itext libraries. you can get a lot of examples on how to convert html to pdf. Since you have told you have experience in web technologies you can use HTML for formatting and using itext or similar libraries you can spool it to pdf easily.
 
Campbell Ritchie
Sheriff
Posts: 48921
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think this question is too difficult for “beginning”, so I shall move it.
 
Jon Swanson
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used PDFjet to write pdf files from Java. It does not parse HTML, but is pretty easy to use.
 
Victor M. Pereira
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you could use jasperReports that can write to pdf and rtf and different presentation data.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one promoted FOP yet?

FOP is my favorite.
 
Rob Stark
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Campbell, appreciate the welcome!

And thank you everyone who has posted so far - I'm learning a lot already and can already see a lot of options opening up. I'll look into each ones in more detail and comment back, in the meanwhile any other suggestions are welcome!!

Thank you all again for the fast responses!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic