Storing PDF files using Blob

Good Morning Everyone,
1) Create a directory(path)
C:\test\test.pdf
2) create a table to hold the BLOB:
create table test(
ID NUMBER,
DOCS BLOB
3) import the file into a BLOB datatype and insert it into the table:
DECLARE
l_bfile BFILE;
l_blob BLOB;
BEGIN
INSERT INTO tab1 (col1)
VALUES (empty_blob())
RETURN col1 INTO l_blob;
l_bfile := BFILENAME('PDF', 'test.pdf');
DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
DBMS_LOB.fileclose(l_bfile);
COMMIT;
END;
I am wondering about the step 3.
Any help,
Thanks,
NY

Oracle support has a document on this topic that may be of use:
How to Load File Content to a BLOB Field and Unload BLOB Content to a File on the OS #471715.1
Also on the Oracle Directory object the path should not include the actual file name. From your post it is not easy to tell how you created it.
HTH -- Mark D Powell --

Similar Messages

  • Stored PDF files with Blob

    I have being storing PDF files using Blob, but it is getting very time consuming to access these files again.
    Is there a better way of doing it? Is there a right way of doing it? I do not need to search inside the PDF, but I do need to access them either inside the Database or outside.
    Thank You for nay help

    I have a need to store PDF files that are documents that will complement process that my systems creates. And I need that those PDF files be accessible from inside my system, I do not need to search insede them because they will be stored by subject inside another subject, therefore whoever need the files will know were to find it, but to store and to access it is taking longer and longer as more files are added to the first thead.

  • Storing pdf file in sql database

    currently i am working on my last semester project.I am using visual studio 2010 to design front end and sql server 2008 for database. I that case i want to store the pdf file in sql server 2008 databae and want retrieve it back as and when required.is
    it possible to do so please feedback me soon with an answer.

    look,
    http://stackoverflow.com/questions/2347842/storing-pdf-files-as-binary-objects-in-sql-server-yes-or-no
    Please use Marked as Answer if my post solved your problem and use
    Vote As Helpful if a post was useful.

  • I want to import a MS Word Index into a .pdf file using Adobe Pro.  How do I do that?

    I want to import a MS Word Index into a .pdf file using Adobe Pro. It is for a book.  The book has been converted to a .pdf for printing, but it needs an Index for the last page of the book.  I tried to embed a new index (starting from scratch but no luck.  Any suggestions?  Thank you for your time.

    Now I want to search this "myArrayStrings.get(r)" in another file. How to do that?Store the returned String. Do the same thing you did to read the first file to read the second file (i.e. read it in line-by-line and store the lines in a list). Then check if that list contains the String you stored from the first list.
    E.g. (using your code):
    String name = myArrayStrings.get(r); // assuming r is initialized somewhere before this
    if ( otherList.contains( name ) ) { // assuming otherList is your second list
        // do something
    }

  • Storing PDF file into DB & restoring back to Filesystem

    Hi Everybody,
    I need to store PDF files into Database (Oracle 8.1.6 on Windows NT). This I could do using DBMS_LOB Package. Now, my problem is bringing back the PDF files to OS filesystem.
    I feel my problem will be solved if I have UTL_LOB Package Object in my Database. Where can I get the script or utility that installs the said Object in my Database. Kindly send me the script/utility if anybody has.
    Thanks & Regards,
    Durai.

    look,
    http://stackoverflow.com/questions/2347842/storing-pdf-files-as-binary-objects-in-sql-server-yes-or-no
    Please use Marked as Answer if my post solved your problem and use
    Vote As Helpful if a post was useful.

  • Creating PDF files using file adapter

    Hi,
    Is it possible to create a pdf file using, File/FTP adapter? If yes can someone please suggest how to do it.
    Thanks,
    Phani

    Hi Phani,
    I would say pdf files are binary files with a specialized format.
    You can move pdf files through BPEL or ESB (i.e. file/ftp -> file/ftp), or from file to database BLOB and database to file, by importing the schema as opaque.
    However I doubt that file adapter can create PDF files from a plain-text xml file, i.e. as PDFCreator would.
    In a sense a pdf file is much like a jpg, mp3, or zip file, it can be passed through bpel but not created.
    In other words if you have a base64Binary element in xml, that you know is the complete bytes to a pdf, jpg, or other file, you can write it out as a file using the File adapter.
    Thanks
    Steve

  • Create PDF file using PL SQL

    Hello All:
    I have an requirement of generating a PDF file using Oracle PL SQL program. Can anyone please let me know the procedure/code of doing this?
    Thanks,
    k Ramesh Gupta

    I have steps to generate Excel sheet output, apply appropriate content-type for PDF in the PL/SQL written below, to get the same in PDF. i suppose it should be application/pdf
    1. Create a custom DAD if required using Enterprise Manager Console of MidTier for HTTP Server or use Portal DAD itself to implement the solution.
    2. Create a new procedure (a webdb solution) to stream the HTML for the excel sheet report which will be downloaded.
    a. Login to Portal schema through SQL*Plus or the respective DAD based schema if custom DAD is created. (below example is created in custom DAD - 'scott').
    SQL>CREATE OR REPLACE
    PROCEDURE generateCsv
    as
    cursor p_emp is select * from PORTAL_DEMO.EMP;
    begin
    owa_util.mime_header( 'application/vnd.ms-excel', False ); -- Here change the content-type to PDF Format accordingly
    htp.print('Content-Disposition: attachment;filename="pvasista.csv"');
    owa_Util.Http_Header_Close;
    for v_emp_cur in p_emp
    LOOP
    htp.p (v_emp_cur.ename || ',' || v_emp_cur.deptno || chr(13));
    END LOOP;
    end;
    SQL> grant execute on generateCsv to public;
    For education purpose getting the report of employee and deptno of al employees from PORTAL_DEMO.EMP table. Implement the necessary query/ Business Logic accordingly.
    b. Now access http://midtier_host:port/pls/dad_name/generateCsv, will download a .csv based excel file report as shown in the screenshot below,
    3. Open the Portal Page where the link is to be added, createa URL Item Link and add the above URL, select option "Open in new browser window"
    4. It can also be enhanced to have filtering enabled on the report by using Portal Form using Option, "Form based on stored procedure" and selecting the above stored procedure.

  • Does anyone know how i can view PDF files using Galaxy Note 2?

    Does anyone know how i can view PDF files using Galaxy Note 2?
    This is what i have been doing;
    I click on the file i wish to view (via a portal)
    this file goes to notification widget (i drag down screen)
    notification/message says download complete
    i click on notification/message
    nows it says complete action using (here i only have 2 icon options 1= DB Text Editor 2 = HTML Viewer)
    I have installed Adobe Reader.

    Can you confirm if the downloaded file is a pdf file, that is it ends with .pdf?

  • How to extract text from a PDF file using php?

    How to extract text from a PDF file using php?
    thanks
    fabio

    > Do you know of any other way this can be done?
    There are many ways. But this out of scope of this forum. You can try this forum: http://forum.planetpdf.com/

  • How to read pdf files using java.io package classes

    Dear All,
    I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block
    Thanks in advance.

    hi I also have the pbm. to read pdf file using JAVA
    can any body help meWhy is it so difficult to read the thread you posted in? They say: java.io is pointless, use iText. So why don't you?
    or also I want to read a binary encoded data into
    ascii,
    can anybody give me a hint how to do it.Depends on what you mean with "binary encoding". ASCII's binary encoding, too, basically.

  • How do I open to a specific page or destination in a pdf file using Buddy API Xtra?

    Hello,
    I'm working with a CD ROM catalog that utilizes the Buddy API Xtra to open PDF files when a link is clicked. The client would like to be able to open to a specific page within a pdf file.
    I can open a pdf file using the Buddy API baOpenfile() function but I'm having trouble opening to a specific page when I add #page=4:
    baOpenfile("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf#page=4","normal")
    I've also tried working with the code below which seems to me like it should work... I didn't realize that the "open..." part of it was a function in Director.
    on mouseUp me
      pageNum = 4
      theApp = baShortFileName(baFindApp("pdf"))
      theDoc = baShortFileName("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf")
      theArgs = "/s /A page=" & string(pageNum)   & "&pagemode=bookmarks"
      -- (translates to "/A page=4" in this example)
      open theApp && theArgs && theDoc
    end
    Thoughts?
    Thank you in advance!

    Thank you Dee! This works perfect!
    It would be cool to know how to use bashell() for this.
    The help files give the following examples:
    Result = baShell( Operation, Filename, Args, WorkDir, State )
    ok = baShell( "open", "c:\windows\notepad.exe", "myfile.txt" , "", "normal" )
    ok = baShell( "edit", "myfile.htm" , "", "", "normal" )
    So I tried:
    on mouseUp me
      -- Close the program group
      tWindowList = baWindowList( "" , "pdf" , false )
      if tWindowList <> [] and count(tWindowList) > 0 then  baCloseWindow(tWindowList[1])
      pageNum = 4
      theApp = baFindApp("pdf")
      theDoc = _movie.path & "pdfs\Powder Cores\Magentics Powder Core Catalog.pdf"
      theArgs = "/A "&QUOTE&"page="&string(pageNum)&"=OpenActions"&QUOTE
      baShell( "open", theApp, theDoc , theArgs, "normal" )
    end
    It opens the pdf file without going to a specific page. Any thoughts as to why it wouldn't accept theArgs?
    Thanks again!

  • How to check the resolution of a pdf file using Acrobat 9 pro?

    How to check the resolution of a pdf file using Acrobat 9 pro?

    PDF files don't have one resolution, but may have none or many different resolutions, one per image. You can check the maximum/minimum resoluion with preflight in Acrobat Pro, but not in Adobe Reader.

  • Laserjet p2055dn is slow printing pdf files using mac

    My Mac is very slow printing pdf files on my hp laserjet p2055dn.  I have noticed fixes for this problem for people using Windows.  Is there a Mac solution?

    Do you want to create PDF files using Java? If so, there is a library available at http://www.lowagie.com/iText/docs.html Check out this site. There are many more similar PDFGEnerator tools that you can use..

  • Print PDF file using Acrobat SDK - Warning message

    Hello,
    We are trying to create automatic program in c# that will print all pdf files located in a specific folder, using Adobe Acrobat 9.0 SDK.
    Whenever the application tries to print file, we receive a warning message ("WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?").
    If we press yes, the file is printed, but next time we'll run the application, this message will appear again.
    Since this application supposed to run automatically (with no interaction with the end users), we want to prevent this warning message from appearing.
    How can we eliminate this warning message?
    Is there any other way to print PDF files using Adobe Acrobat from another application?
    Thanks,
    Lilach.

    joeln3:  I believe the original post refers to a client application, not a web page.  Why use JavaScript from within a client application?  I understood their use case to involve a client app referencing the PDF Library, loading various PDF files, and using one (or more) of the PDF Library's Print methods to invoke Acrobat's internal print routines.
    Dave

  • How can i scan to a pdf file using hp officejet 4500 scan feature

    how can i scan to a pdf file using hp officejet 4500 scan feature.  only give a jpg or bit extension

    pf1tarac wrote: how can i scan to a pdf file using hp officejet 4500 scan feature.  only give a jpg or bit extension
    Hello pf1tarac, I don't believe that is possible. In order to create a PDF file, you would need Adobe Acrobat or some other PDF compatible product to save a scan to the PDF format.
    There are some free PDF programs available.  Here  is a link to one of them.
    Please click the White Kudos star on the left, to say thanks.
    Please mark Accept As Solution if it solves your problem.

Maybe you are looking for