Solved

HOW to display BLOB (.pdf files)

Posted on 2004-08-26
4
2,861 Views
Last Modified: 2011-04-14
HI ,

I am having a problem with displaying pdf files which stored in the oracle database as BLOBs
i have a table which has a blob column and i save all .pdf , .doc , .xml , .txt files as BLOBs. and i use oracle text to do the content searching and display the results in a web browser. When some one insert a query(to search keyword) , it will search the blob column and display matching documents. when someone click one document i want to display the document.

my idea was when the ,first when some one insert a query ,it will starts a searching and return the document id's, and document names first and when some one select a specific document using document id get the related document. (that is if some one click a .pdf file i want to display the pdf file in the browser.)

i am using JSP and servlet for web client.

can some pls tell me how to  get pdf file out of blob object and diplay it in the browser.

thanx.
0
Comment
Question by:sasankad
  • 2
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 11902595
I found this for PHP (STFW):
http://forums.oracle.com/forums/thread.jsp?forum=178&thread=233174&message=&tstart=45&trange=15706898

Hope this gives you already some ideas...
0
 

Author Comment

by:sasankad
ID: 11909401
HI

angel thanx for ur reply.

but in that site they have shown how to insert pdf file in to BLOB in the database. I have already done that part. The question is displaying it. because i first display the search result based on the keyword (or searching query) and then display the relevant .pdf or .doc after clicking one of those results.

regards.
      sasanka
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 11910107
Yes, the question is about how to store it, but there is also some code to display it:

// Now query the uploaded BLOB and display it
  $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = '.MYBLOBID;
 ...
0
 

Author Comment

by:sasankad
ID: 11960981
thanx angel III

it helped me a lot...
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question