• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

PDF generation

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

Not sure..where to post this...

In a web application...how can i have PDF's created and saved in the Database and then read it later from the database.

Any tips..would be welcome.

Currently am thinking of using a BlOB field for this...Am i right...

Thanks & Regards
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What part of this do you need help with -- creating PDFs, or storing them in a database?
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try apache's FOP to generate pdf (It can be found on the apache website).
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try http://www.lowagie.com/iText/ , I recently used it with success.

Base64 encoding will allow you to store it in a text field if you prefer.
Santosh
[ December 05, 2005: Message edited by: santosh kulkarni ]
 
A Kumar
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for all the replies..

I will tell you my requirement.Actually i have to show information as a Pdf for the users of the application.

So i have 2 options.

Either the admin will generate his contents as a PDF and I have to store them in the database and retrieve it back for the clients in their browser.

Or

I have to ask him to upload the contents into the Database plain text/images and then generate the PDF from these data for the clients to view in their browser.

Also these PDF's in the browser should be copy-disabled.

How should I solve this..Which is the better one and whats the procedure to go about..?

Regards,
A Kumar
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.lowagie.com/iText/ works like a gem for the 2nd option....u can store the plain old pdfs in ur db and the 'iText' has methods to parse thru the pdf fields in the pdf and enter values on the fly into the pdf.
 
A Kumar
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

Thanks for the reply..

In your reply..you mentioned that itext works fine for the second method...

Then how about the first one...

And among these 2 which is the better one...What do you suggest..??

Thanks in advance..
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kumar,

if you want dispaly DATA in PDF format to end user and that should stored in Database right?

There is solution for that, Thats called Apache Cocoon framework, using this you can achive your requirement.

Its one of web framework like Struts........

I thinks this description sloves your problem. right?

Thanks
Ram
[ December 07, 2005: Message edited by: Reddy Ram ]
 
A Kumar
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ram...

I am yet to start of development..its still in design stage..

so am not sure..how to go about it..

Will check on the framework...


Thanks & regards
A Kumar
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a previous project I compared Apache FOP and iText. FOP is better for larger projects, less memory intrinsic, large pdfs, suitable for web applications. In this same application when we used iText the application became very slow.

I will recommend performance testing on whatever tool you choose for web access. It will be better if you can design the application such that the "pdf generating tool" can be switched if needed.

The copy aspect of the pdf can be disabled using both the tools. Itext is simple to use. Apache FOP is more popular. It is more generic and could be an industry standard in future.

[ December 07, 2005: Message edited by: jiju ka ]
[ December 07, 2005: Message edited by: jiju ka ]
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a similar project on which we used JAXB API along with XSL to render database results in form of pdf files. Certainly, it will require an understanding of XML/XSLT, but it gives you good control over the report template/format

Mahesh
 
A Kumar
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..

I didnt knew that there were these many options for generating PDFs..I will have to have a close look at all of them before deciding..

Thanks all for your suggestions...

Thanks&Regards
A Kumar
[ December 07, 2005: Message edited by: A Kumar ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic