How to view PDF files strored in a BLOB column

Hi all,
I want to display a PDF file, stored in a BLOB column, in a form or through a JavaBean.
But the problem is more complicated then that. I do not want to retrieve the PDF file in the application server that show it through a browser.
Actually, I do not want users to get the entire file, I just want them to see it or print it.
I want, in fact, to display a "stream" of bytes through Oracle Forms. Not a file.
This one, sounded to be a good solution, but actually not. When the file was too big (multiple pages), the application was blocked until the entire file was loaded. And when you try to print it, it wasn't printed right. The advantage of this solution is that it is open-source so we can add methods to connect to the DB, retrieve the content of the BLOB column and displays it without downloading the file.
Here is a good solution. Really good, files are loaded quickly, the rendering is really good and the file is printed perfectly (as it was printed from Adobe Acrobat). The disadvantage of this solution is that it is not open-source and is really expansive.
As you can see, both solutions uses PJC.
So any help, any idea to solve my problem will be highly appreciated.
Thanks to all of you,
Amine
PS : I am using F&R 11gR2

Not entirely. At least we came to the conclusion it doesn't make (much) sense to block the save option of PDFs if you want to allow printing them
Anyway; there is of course another possibilty: you could always write your own java bean PDF reader; there are plenty of java PDF libraries available:
Open Source PDF Libraries in Java
The easiest way would be to choose one which can open a PDF from a URL and render it; I would retrieve the image via mod_plsql using WPG_DOCLOAD and simply use the PDF library to render the PDF. No tempfiles anyway, and if you don't implement it there is also no save button.
cheers

Similar Messages

  • How to view pdf file in java/jsp?

    Hello Everybody,
    Any one help me how to view pdf file in jsp using java application.
    I have pdf file c:\app.pdf.
    How can i display the pdf file.
    Please help me.................
    Thanks

    Hello,
    You can use the below code, but i am not sure how far is this a startard way of doing it.
    # <%
    # ServletOutputStream servletOutputStream = response.getOutputStream();
    # File reportFile = new File("C:\\Tomcat 5.0\\webapps\\TestApp\\myfile.pdf");
    # FileInputStream fis = new FileInputStream(reportFile);
    # byte[] bytes= new byte[128000];
    # int count=fis.read(bytes);
    # try
    # response.setContentType("application/pdf");
    # response.setContentLength(bytes.length);
    # servletOutputStream.write(bytes, 0, bytes.length);
    # servletOutputStream.flush();
    # servletOutputStream.close();
    # }catch(Exception e){}

  • How to upload a file into a db blob column from adf page

    How to upload a file into a db blob column from adf page
    Which option to use ?

    The forum search would be my first try...
    Then google...
    This has been asked at least once a week and got correct answers...
    Timo

  • How to view PDF files like a flipping magazine?

    Hi, I am new here. I didn't know if it is the optimum catagory for my question, I hope you guys will help me.
    In brief, I want to view PDF files like a flipping magazine. You know, just the same flipping effect that ibook did on ios. Adobe reader is the only choice to browse PDF on computer for me. It's kind of bothering and annoying now.
    So, any ideas for that? Plus, my computer runs on win7 64bit.

    This is also a good site:  http://www.issuu.com/  You can sign up and use it for free or you can upgrade(for a price) to make custom changes (like background color, button color, etc.)  You can also embed the html code into your website if you would like someone to view it there.  Good luck!

  • HOW TO VIEW .PDF FILES IN ITOUCH4 .

    I DO NOT HAVE INTERNET CONNECTION . CAN ANYONE HELP ME IN VIEWING .PDF FILES LOCALLY WITHOUT INTERNET CONNECTION.DO ITOUCH4 HAVE BUILT IN FEATURE TO VIEW .PDF FILES.

    Hello pvoona,
    And welcome to Apple Discussions!
    DO ITOUCH4 HAVE BUILT IN FEATURE TO VIEW .PDF FILES.
    No it does not. You'll need the help of an application from the App store in order to do this. You can also view PDFs on the web via Safari.
    And for future reference, please do not type in all caps. It gives the impression that you are yelling.
    B-rock

  • How to view pdf files inside firefox?

    I spent hours on this. pdf.js sucks ass. Neither foxit nor adobe reader works. I have been using firefox since 2.0.0.20. I will have to quit if I can't view the pdf files inside my browser! The worst thing that has ever happened to firefox is the pdf.js shit. It is slow as shit and useless like shit. Just let pdf files be handled by the pdf program.

    hello, please refer to [[How to disable the built-in PDF viewer and use another viewer]]

  • How to view PDF files in Safari

    Hi,
    I can't view PDFs in Safari since updating to 5.1.  I just get the annoying dark-grey screen
    I don't have Adobe Reader/Pro installed, I don't have the internet plugin, I have tried running the phrase in Terminal that is supposed to tell Safari to open PDFs not get another program to (cut and paste into terminal as is from various other threads) and I have tried downloading the file form this address: http://www.macupdate.com/info.php/id/22361/safari-display-or-download-pdf-files (incidentally, I can't download it because Safari tries to open the .dmg file in a new tab, but that doesn't work, nor does OPT-click -> Download linked file allow me to download it).
    I've been to the Genius Bar at that local Apple store and the tech couldn't help - even though she looked at the problem for about 30 mins.
    Does anyone know of any other possible fixes for this incredicbly annoying problem?
    Cheers
    Sean..

    Please enable guest logins and log in as Guest. Test. Same problem?
    Mac OS X 10.6 Help: Creating a guest user account

  • How to view PDF files in Safari 5.1?

    Every time I try to view a PDF file in Safari 5.1.1 (double clicking or using the contextual menu)i, it downloads the file instead. Is there a fix for this?
    Adobe tells me that their plugin will not work with Safari 5.1 (with Lion or Snow Leopard) and suggests that I revert to Safari 5.0/Leopard.
    A.

    Go to /Library/Internet Plug-Ins.
    Move the PDF Browser Plug-In to the Trash.
    Restart your Mac. Try viewing a PDF in Safari.
    Known Issues | Adobe products on Mac OS 10.7 Lion

  • How to view pdf files without downloading them on firefox for android

    I use an Electronic Medical Record program using Firefox for android on a a Samsung Galaxy Pro 12.2 tablet. I need to view patient pdf files on the tablet. So far, the only way I have been able to accomplish this is to download the file first. It would be more efficient if I could just view the pdf file on the Galaxy tablet without having to download it. Is it possible to do this with Firefox for android? Thanks.

    Not in any reliable manner. There is PDF.js but it has not been optimized for Firefox for Android. https://github.com/mozilla/pdf.js/#firefox

  • How to display pdf-files out of a blob

    Hello,
    we want to use pdf to publish our enterprise-informations (jobs, press release...) in the intranet.
    How can a display a pdf-file with Portal that was saved in blob?
    regards
    Ralf Schmitt

    Not entirely. At least we came to the conclusion it doesn't make (much) sense to block the save option of PDFs if you want to allow printing them
    Anyway; there is of course another possibilty: you could always write your own java bean PDF reader; there are plenty of java PDF libraries available:
    Open Source PDF Libraries in Java
    The easiest way would be to choose one which can open a PDF from a URL and render it; I would retrieve the image via mod_plsql using WPG_DOCLOAD and simply use the PDF library to render the PDF. No tempfiles anyway, and if you don't implement it there is also no save button.
    cheers

  • Error while opening PDF file downloaded  from database Blob column

    Hi All,
    I am working on jdev 11.1.1.4.0.
    In my use-case I am using filedownload Actionlistner on a link to get the PDF file stored in the database in blob field. These files are being uploaded from other use-case in adf only.
    After getting the dialog box to open/save/cancel for the PDF file when i click on open then i am getting an error *'Adobe Reader could not open 'abc.pdf' because it is either not a supported file type*
    or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly docoded)' for some files , and to my surprise I am able to open some files.
    When I open these PDF files separately from desktop I am able to view the content of each and every file in adobe reader.
    I dont know where the problem exactly lies , while uploading/downloading the file . Any ideas/thoughts to resolve this issue?
    Thanks
    Kanika

    Thanks a lot Timo...!!!
    I checked the PDF file downloaded directly from the blob column in DB, there only it is corrupted so must be the problem in uploading the file. I am checking the code line by line,, but no problem in setting the file content type,size etc.
    Here is the code snippet ..
    byte[] buff;
    buff = new byte[(int)length]; -- Length is the file size
    int bytesRead = is.read(buff);
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = is.read();
    int b = is.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    BlobDomain blobDomian = new BlobDomain((buff));
    TestVORow = (TestVORow Impl)TestVO.createRow();
    if(blobDomian != null) {
    TestVORow.setAttachment(blobDomian);
    am.getTransaction().commit();
    This seems to be Ok to me..the same issue, file is still corrupting.
    Any thoughts from your side ???
    Thanks
    Kanika
    The problem is resolved.
    Changes made are instead of
    InputStream is;
    used ... BufferedInputStream bis ;
    and after
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = bis.read();
    int b = bis.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    bis.close(); // use this close bufferedInput Stream.
    Able to open each and every file now..Thanks for your suggestions Timo and Frank.
    Edited by: Kanika on Mar 6, 2012 3:15 AM

  • How to get the File-Type from a BLOB-Column

    Hi all,
    I have the database table with the BLOB-Column. In this column are Word/Pdf/Excel/... files can be stored.
    Now I want to open these Files from Webforms.
    I can download the file from database to the client and then open the file with client_ole2.CREATE_OBJ('Word.Application');
    But I can not be sure that the file is a Word-Document.
    How can I know which application is saved in the BLOB-column?
    Regards

    Hi Francois,
    thank you.
    Unfortunatelly I do not know the interMedia functions. Can you send me an example with interMedia?
    I am working with your solution with WEBUTIL_HOST.blocking.
    But when I do not give the extension for the file, in that the BLOB will be temporary stored, I get to see the Windows "Select Program..." window. When I select Word or anything else then the file will be opened, but the locking does not working.
    Any ideas?
    Regards

  • How to view pdf files in xperia mini pro

    I have downdoaded a Sony ericsson mobile manual in pdf format. I tried to open it in my mobile by using office suit but its not opening. How to solve this problem?

    Well, like mentioned above, Adeobe reader is a good choice for pdf readering. But if you need a comprehensive pdf viewer, which can offers more funtions rather than only pdf reading option, then you can try a certain pdf windows viewer. I seldomly use such pdf reader, but they are great indeed. Because you can use it to view and realize some basic pdf processings.

  • How to upload pdf file in iphone and how to view

    how to upload and how to view pdf file in iphone 5s

    Hey saif.antri,
    You can view PDFs and more using iBooks on your iPhone:
    iBooks: Viewing, syncing, saving, and printing PDFs on iPhone, iPad, and iPod touch
    http://support.apple.com/kb/HT4227
    Have a great day,
    Delgadoh

  • How to display pdf file in windows phone 8 silver light application?

    Hi,
    I am developing windows phone 8 silver light application . For my app I want to display pdf files . Is there any default controls to display pdf files ?
    I don't want to display using launchers , I want to display with in the app.
    any help,
    Thanks..
    Suresh.M

    Probably this should give you a fair idea : How to view PDF file inside an Windows Phone application?
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

Maybe you are looking for

  • Error in stock transport requisition

    Hi SAP gurus, to transfer the stock from one plant to another plant within same company code, i have created two new plants as supplying and receiving plant. i have done all the customization setting and tested it in development. in Dev it is running

  • IMessage is blocking texts from other iphone users

    I am not able to send or receive texts from other iphone users because of imessage.  I am ready to quit Apple and ATT because of it.  Both my wife and the manager of my business can no longer contact me because of the bugs in iMessage.  I don't care

  • Access Mysql DB from Azure Linux VM

    Hello Team, We have sated up Linux VM (ubuntu12.04LTS) with apache, MySQL on it. all working fine. Now we want to access Database created in VM form outside form Sqlyog. I have added the endpoint for MYSQL 3306, but while connecting it gives us an Er

  • Remove check table from a characteristic in CO-PA

    Hello, for one user defined characteristic in our operating concern, we would like to remove the related check & text table (T25**). We would like to keep the values and keep using the field, but without the additional controls of the check table; No

  • Button hierarchy on layers in interactive PDFs

    Hi, we recognized a flaw in the display of interactive buttons within interactive PDFs: We created a document with several buttons, that are mentioned to display other hidden buttons, when clicked. The problem is that even when the layer of the butto