saving and retrieving PDF file into the database from java

128 views
Skip to first unread message

Manjunath More

unread,
Mar 19, 2010, 2:19:46 AM3/19/10
to

Hi Guys.

I am doing little R&D on saving & retrieving PDF file to & from the oracle database.
Has anyone have any idea of how we can do this in java..

I need to save a PDF file or its content into the database and need to display when user wants to it into PDF file.

I have heard of itext & jasper features, but never worked on it.

I am also googling on this, but have not got any satisfactory solution,
so please revert back if you have any idea,source code or anything..

Thanks,
Manjunath Prakash More
Asst. System Engineer
Tata Consultancy Services
Quadra II, Survey No. 239, Sadesataranali,
Opposite Magarpatta City, Hadapsar,
Pune - 411 028,Maharashtra
India
Ph:- 02066224519
Cell:- +91 9922566366
Mailto: manjuna...@tcs.com
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Renu Zadbuke

unread,
Mar 19, 2010, 5:18:23 AM3/19/10
to met_at...@googlegroups.com
no idea re...have uploaded .csv files but never pdf

> To unsubscribe from this group, send email to
> met_at_syntel+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>

Pravin Kulkarni

unread,
Mar 22, 2010, 4:49:40 AM3/22/10
to met_at...@googlegroups.com
Hey,
I have done this.
You can upload your any file in Oracle as BLOB object.
 
By using Multipart form you can send your file from client to server. At the sever end You will receive your file with multipart header.
 
you just have to identify your file content start byte and from that byte you can start reading the file.
 
these bytes you can write in BLOB object.

Manjunath More

unread,
Mar 22, 2010, 5:44:45 AM3/22/10
to met_at...@googlegroups.com

Hi All

I have done this..But Pravin I have tried another way..
not with multipart data..but using response object and little R&D..

While Storing any File into the DB I have used BLOB and from java I am saving FileInputStream into it.

and when I need to open that perticular file I m just getting everything into the bytes array and setting that byte array in the response object.
with content type and header and writting the data into the OutputStream.

So its worked..

Thanks for your input Pravin. :-)))


From: Pravin Kulkarni <mr.pravin...@gmail.com>
To: met_at...@googlegroups.com
Date: 03/22/2010 02:19 PM
Subject: Re: saving and retrieving PDF file into the database from java
Sent by: met_at...@googlegroups.com


To unsubscribe from this group, send email to met_at_syntel+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply all
Reply to author
Forward
0 new messages