Exporting Blob to PDF File [message #338000] |
Sat, 02 August 2008 03:00 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mailtokkalyan
Messages: 65 Registered: December 2006 Location: Bangalore
|
Member |
|
|
Hi,
I have inserted a PDF File into BLOB Column. But Now i want to export that Blob to PDF again. i have been tried with some java coding.
But i m getting
ORA-29532: Java call terminated by uncaught Java exception:
java.security.AccessControlException:
the Permission (java.io.FilePermission
\server\\users\Muthu\pdf\sample.rtf write)
has not been
granted to TRAINEE. The PL/SQL to grant this
is dbms_java.grant_permission( 'TRAINEE',
'SYS:java.io.FilePermission',
'\server\\users\Muthu\pdf\sample.rtf', 'write' )
ORA-06512: at "TRAINEE.EXPORTBLOB", line 0
ORA-06512: at line 8
But already i gave the grant permission to user.
Any one please tell me the actual problem. how to solve this issue.
Regards,
Kalyan.
[Updated on: Sat, 02 August 2008 03:02] Report message to a moderator
|
|
|
|
|
Re: Exporting Blob to PDF File [message #338135 is a reply to message #338045] |
Sun, 03 August 2008 23:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mailtokkalyan
Messages: 65 Registered: December 2006 Location: Bangalore
|
Member |
|
|
Dear,
I will explain you what is my actual problem.
I am using Client/Server only. (Forms 6i)
actually i want to store PDF files in Database.... and whenever i want to see or print, i will press a button, then it has to Display in acrobat reader.
This is what my actual issue. Please Tell me the solution.
Thanks in advance.
Regards,
Kalyan
|
|
|
Re: Exporting Blob to PDF File [message #338277 is a reply to message #338000] |
Mon, 04 August 2008 07:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/56289.jpg) |
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
I think you have some reading to do. Using the posted link from Barbara, I found this:
Quote: | I found the following solution - in the oracle documentation! - to download a blob to the browser:
(My blobs are in a table called "files" in the column "content" and the mime type of the content is
store in another table called "mimetypes" column "name". Master-Detail-Relationship.)
|
create or replace procedure download(p_file_id files.id%type)
as
l_lob files.content%type; l_mime mimetypes.name%type;
begin
select f.content, m.name
into l_lob, l_mime
from files f, mimetypes m
where f.id = p_file_id
and f.mimetype_id = m.id;
owa_util.mime_header(l_mime, false);
owa_util.http_header_close;
wpg_docload.download_file(l_lob);
end;
Quote: | This worked on my 9i Rel. 2 DB.
I think this is the best way to do this - and it's already there in the DB!
So, an hour invested in reading the docus is a well invested hour.
|
Seems like this might be of use to you, but you will have to research the owa_util package, and the wpg_docload package.
Good luck, Kevin
|
|
|