This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Is there a Java API/tool for this problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is there a Java API/tool for this problem?" Watch "Is there a Java API/tool for this problem?" New topic
Author

Is there a Java API/tool for this problem?

Prak Sub
Greenhorn

Joined: May 21, 2004
Posts: 4
Dear Ranchers,

I am wondering if there's an API/product (may be you have used) that will allow us to do following:

We are developing a web based application under J2EE environment (Websphere 5.1) and need to be able to:

1. Collect user input data from regular web forms

2. Populate a fillable PDF form using the input data AND data from a database.

3. Output the filled PDF to a browser.

4. And possibly send the PDF to a user's default printer (without user intervention).

Thanks in advance,
Jeffrey Hunter
Ranch Hand

Joined: Apr 16, 2004
Posts: 305
FDFToolkit for Java will meet some of your needs. It is an API provided free by Adobe and can be found here.

I've used this API, in conjunction with Adobe Illustrator, Acrobat Professional, to create dynamic, web-based forms. As it existed in a web environment, I used a Servlet to implement the libraries and control the form processing, pdf generation, etc.
ravi vinnamuri
Greenhorn

Joined: Jun 17, 2003
Posts: 6
you can find info at lowagie.com
K Akshay
Greenhorn

Joined: Jun 10, 2004
Posts: 2
FREE Java PDF generation APIs is available at called Smart JPrint. <a href="http://www.activetree.com">http://www.activetree.com</a>
It not only generates PDF for ant kind of (server and front end)Java programs, it lets you send the output to a selected printer (incase you want to print the output), allows you to preview the PDF output in a nice GUI window so that your user can view the pages generated from your program. User can then output the selected pages or range of pages to a printer or to a PDF file. Use the preview feature when you are using the Smart JPrint APIs in the Swing GUI programs.

Therefore, you can create your PDF dynamically from your J2EE server using the Smart JPrint PDF and printing APIs and then put the document name as the link to the newly displayed HTML page. The PDF file it generates can be automatically be printed to a printer using the JPrint api too ofcource silently, i.e. without showing any dialog for page and printer sleection etc.). The printer is selected automatically by the JPrint APIs for you.


It is just wanderful with the following features.


100% Java and needs no other library.
You can convert RTF documents into PDF from swing components such as JTextPane, JEditorPane, JTextArea and other kind of custom JTextComponent. JTable content too can be easily converted to PDF.
THE NICE THING WITH this APIs is that it automatically breaks the lines and columns to create number of pages and uses the PAGE FORMAT YOU PROVIDE.
It has a System.out.println kind of APIs to output the TEXT (with RTF styles, e.g. COLOR, FONT, UNDERLINE), ICONS/IMAGES, and 2D Graphics using its write() methods. The lines are automatically broken into pages.
Look at the online APPLET demo that lets you get the test of PDF generation online and instantly.

You can add header and footer to the generated pages using your own custom format.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a Java API/tool for this problem?
 
Similar Threads
PDF extraction
display output as pdf
PDF Reader
modeling a complex business form
Dynamically invoking functions/classes based on metadata (datatype)