Show PDF inline

Dear all.
I show a pdf through a BSP that works fine with
response->set_header_field(
                   name  = 'content-disposition'
                   value = 'attachment; filename=webforms.pdf' ).
but a I'd like to use the "inline" way in order to avoid the popup asking for open/save.
But, if a replace 'attachment' for 'inline' in content-disposition I only get a blank page.
This is the entire code:
Fill HTTP request
response->set_header_field( name  = 'content-type'
                            value = 'application/pdf' ).
response->set_header_field(
                   name  = 'cache-control'
                   value = 'max-age=0' ).
response->set_header_field(
                   name  = 'content-disposition'
                   value = 'inline; filename=webforms.pdf' ).
response->set_data( data   = l_pdf_xstring
                    length = l_pdf_len ).
navigation->response_complete( ).
Thanks a lot

Hi,
What about using an iframe. Check http://www.cs.tut.fi/~jkorpela/html/iframe-pdf.html for details.
Eddy

Similar Messages

  • Showing pdf in Fire fox giving problem

    Hi every body ,
    I have a problem related to PDF showing in the browser , It is working fine in the IE , but in the FF it is not showing .
    Here is my Backing bean code for fetching the PDF .
    The main backing bean name is myBean.
      public void showPDF() throws IOException  
              BufferedInputStream input = null; 
              BufferedOutputStream output = null; 
              InputStream inputStream =null;  
              FacesContext facesContext = FacesContext.getCurrentInstance(); 
              ExternalContext externalContext = facesContext.getExternalContext(); 
              HttpServletResponse response = (HttpServletResponse) externalContext.getResponse(); 
             try  
             //It is a simple POJO , it will return the pdf content 
                     PDF  pdf =  new PDF(); 
                 inputStream = pdf.getPDFContent(); 
                 input = new BufferedInputStream(inputStream, DEFAULT_BUFFER_SIZE); 
                 response.reset(); 
                 response.setContentType("application/pdf"); 
                 response.setHeader("Content-disposition", "inline; filename=\"" + pdf.getFileName() + "\""); 
                 output = new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE); 
                 byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; 
                 int length; 
                 while ((length = input.read(buffer)) > 0)  
                     output.write(buffer, 0, length); 
                 output.flush(); 
             }catch(Exception ex) 
                 ex.printStackTrace(); 
             finally { 
                output.close();  
                input.close();  
              facesContext.responseComplete(); 
         }  Here is my view JSF
    <h:commandLink  value="Show PDF" action="#{myBean.showPDF}" target="_blank" />  Thanks & regards,
    S

    The problem is
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 7em;
       float: right;
    Change the value back to left.
    The menu bar will now left align itself. To fix that we will go to the container, give it a width and float it to the right as follows.
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: 42em;
        float: right;
    Gramps

  • Attachments show up inline as base64 (?) text

    Sometimes I receive email with attachments that show up inline in the text as base64 (maybe) encoded text instead of as attachments. Sometimes attachments appear correctly. I don't know what makes the difference, though the bad attachments seem to appear most often when something has been forwarded multiple times. My 80-year old mom, using a windows box, receives lots of such mail from her friends and sometimes forwards them to me.
    Well, I know those attachments aren't really bad -- because when the base64 encoded text appears, I can view the mail using my ISP's web mail instead of Mac Mail and the attachment appears fine. It's just in Mac Mail that the attachment is unviewable. A small excerpt appears below.
    Normally I just ignore those emails. But now, my mom needs a new computer. Her 330 MHz wintel box is on it's last legs. I want to recommend a Mac to her, but can't really do that if some of her emails she receives have attachments that are going to be unviewable.
    Any idea what could be causing this? Thanks.
    Short excerpt copied from Mac Mail:
    Subject: Fwd: FW: Re: FW: Texas Justice by old ladies -
    Subject: FW: Re: FW: Texas Justice by old ladies -
    OyBUaHUsIDEzIEp1bCAyMDA2IDEyOjAyOjA5IC0wNzAwDQpYLU9yaWdpbmF0aW5nLUlQOiBbMjA1
    LjE4OC4xNTcuMzVdDQpBdXRoZW50aWNhdGlvbi1SZXN1bHRzOiBtdGEyODAubWFpbC5tdWQueWFo
    b28uY29tDQogIGZyb209YW9sLmNvbTsgZG9tYWlua2V5cz1uZXV0cmFsIChubyBzaWcpDQpSZWNl
    aXZlZDogZnJvbSAyMDUuMTg4LjE1Ny4zNSAgKEVITE8gaW1vLWQwMy5teC5hb2wuY29tKSAoMjA1
    etc.
    iMac G5   Mac OS X (10.4.7)  

    I just got a MacBook Pro (10.4.7) and I have this same problem. My Sun Java System Message Server (IMAP) is showing attachments inline. .doc and .pdfs for example, look they are base64 encoded.
    Has Apple acknowledged this as an issue?
    example ...
    --Boundary(IDxPh0qFnn4e9MoE538xtoAA)
    Content-type: text/plain; charset=iso-8859-1
    Content-transfer-encoding: 7BIT
    Attached is the agenda for the ...
    ... <<Minutes8.06.doc>> <<Agenda.9.06.doc>>
    --Boundary(IDxPh0qFnn4e9MoE538xtoAA)
    Content-type: application/msword; name=Minutes8.06.doc
    Content-transfer-encoding: BASE64
    Content-disposition: attachment; filename=Minutes8.06.doc
    Content-description: Minutes8.06.doc
    0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAA
    LgAAAAAAAAAAEAAAMAAAAAEAAAD+////AAAAAC0AAAD/////////////////////
    ///////////////////////////////////////////spcEATSAJBAAA8BK/AAAA
    AAAAEAAAAAAABAAA5wsAAA4AYmpiauI94j0AAAAAAAAAAAAAAAAAAAAAAAAJBBYA
    IhoAAIBXAACAVwAA5wcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8A
    AAAAAAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAGwAAAAAAKgA
    AAAAAAAAqAAAAKgAAAAAAAAAqAAAAAAAAACoAAAAAAAAAKgAAAAAAAAAqAAAABQA
    AAAAAAAAAAAAALwAAAAAAAAA/gUAAAAAAAD+BQAAAAAAAP4FAAAAAAAA/gUAAAwA
    AAAKBgAAHAAAALwAAAAAAAAAZBgAADIBAAAyBgAAAAAAADIGAAAAAAAAMgYAAAAA

  • How to load and show PDF on stage in Flash using AlivePDF or PurePDF external libraries?

    Hello,
    I searched a lot on internet but didn't find a proper way to load and open/show PDF on stage in Flash. Following are my understandings about this topic.
    I know Flash does not have the built-in functionality to load and show pdf document on stage.
    I know you can do this in AIR application using HTMLLoader class but it required adove reader to be installed on your machine.
    I have used AlivePDF/PurePDF and I know how to export/generate a PDF File using these libraries but I don't know how to use them to load and show PDF document on stage in Flash. According to my research, I think these libraries can accomplish my task but how, I don't know. That's because I am here for your help.
    People suggest to first convert pdf into an image or swf file and then import it into Flash but I don't want this solution because my clients will be importing/uplading PDF file into my software.
    Some people suggest to "Convert PDF renderer code written in C/C++ using Alchemy to flash library" and then use that library to my project. I don't have any idea how to do this. If anyone can help me to achieve required functionality this way, please guide me.
    Now you know about my understandings, so you can guide me in better way. Let me give you an example what kind of functionality I want. Please visit: https://www.pdffiller.com. Upload a pdf file there and you will see that it shows that pdf to user (At the moment, I want this functionality) and pdf annotation i.e. write text on pdf and other functionalities.
    NOTE: I am not a Flex and AIR developer. I am a Flash (Actionscript 3.0) Developer. So please first help according to flash. If you want to offer the solution according to Flex and AIR, you are most welcome.
    I specially want "ADOBE EXPERTS - Adobe Flash developer from Adobe" to comment on this and help me out. It's about 4th day I am without a solution. I am afraid, I'll loose my client if I'll not have a solution in next couple of days.
    Thanks,
    momersaleem
    eLearning Specialist

    Just to throw in a $0.02, I looked at those libraries myself quite a while ago and all they had the ability to do was give you information and assets from the PDF. At that point you literally had to read each page in the PDF (whatever the library could extract), use the information it extracted (position, type size, images, etc) and create a layout engine that could "reconstruct" the page piece by piece.
    I hope it's better these days but that's what I took from those libraries quite a while ago and it may still be true. That would explain "Convert PDF renderer code written in c/c++ using Alchemy to flash library". Someone may already have written a quality layout engine. Otherwise there was no "load pdf, run this ShowPDF() function to add to display list" functionality at all.

  • Issues showing PDF files in web-browser (Windows 7 x64, 32-bit version of AdobeReader X)

    I'm not sure if this is the right way to share my experience, but at least I know Google will discover this thread eventually and maybe someone else will find what I have been looking for the past 3 hours
    I'm deploying the 32-bit based AdobeReader X (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4950) to Windows7 32-bit and 64-bit based machines. This is a MSI deployement done through our Active Directory. Everything goes well - no errors. Except for the x64-based machines having trouble showing PDF-files in the web-browser.
    I used Adobe Customization Wizard X to customize our MSI installation - this showed out to be the solution once again.
    Common for the installation on Windows7 32-/64-bit were that the value in the registry database for HKCR\Software\Adobe\Acrobat\Exe (Default) was set to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe". This is valid for the 32-bit installation as Program Files is situated in C:\Program Files, but since it's a 32-bit edition of AdobeReader that I'm installing on the 64-bit based system as well, it's installed in C:\Program Files (x86) and the reference in the registry database to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" is therefore not valid - which explains why PDF files could not be displayed in the web browser. Changing the registry to "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" solved it. Now this is a manual solution which might be useful on 1-2 machines but on a bigger scale it's not the right way to do it.
    I could change it with a batch/vbs script but still this is only a solution of the symptom and not a solution to the core issue. I therefore focused on Adobe Customization Wizard X again.
    The problem was easily solved. I opened the MSI file, loaded the transform file that I've made previously. Went to Registry > HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe . I then changed the (Default) value from "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" to "[INSTALLDIR]Reader\AcroRd32.exe", generated the MST file and replaced my current one for distribution. Problem solved! :-) The entry in the registry now shows : "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" and PDF files are open without any issues.
    I hope someone can save a bit of time on this one.
    Best regards!
    Alex Mikkelsen

    I was able install and view the files in adobe reader 10.1.1 and in web browser window 7 64 bit machine.  But when I go to Edit-preferences-internet and  unchecking "display PDF in Browser" , I am not able to view the pdf files in ie 9 browser.  I have used this javscript to check for pdf version.
    Immediately after installing adobe--
    when I do adobe test in ie 9---https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html--  launches a test pdf file--Acro_Test.pdf
    After unchecking-- it stays in the  https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf
    Tried to go back to "display PDF in Browser"--it is showing it is checked(eventhough I did not check it)
    and in ie
    it stays in the https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf

  • How to set up Internet Explorer 9 to show pdf in Adobe Reader instead of web browser

    Hi,
    I'm using Windows 7 (64-bit), Internet Explorer 9 and Adobe Reader IX (v.11.0.00).
    I would like to set up Internet Explorer 9 to show pdf-files in Adobe Reader program windows instead of viewing pdf-files within the web browser. Adobe Reader IX doesn't have the setting "Display pdf-files in browser" any longer, earlier versions of Adobe reader did have that setting.

    Read this:
    http://forums.adobe.com/thread/1082459

  • Safari no longer able to display PDFs inline?

    When I visit a site in Safari that displays a PDF inline, Safari refuses to display it and downloads it instead.  Anyone else having this problem?  In Snow Leopard, Safari could display PDFs inline in the browser just fine...
    Andy

    Same problem here. As soon as I upgraded to OS X Lion, Safari now downloads PDF's and then launches the viewer.  I always loved that Safari was able to view PDF's inline without having to download and launch an external viewer. 
    Hopefully Apple will fix this soon!
    It's still listed as a feature of Safari 5.1 at http://www.apple.com/safari/features.html:
    Inline PDF Viewing
    Safari on the Mac comes with a built-in PDF engine, allowing you to quickly review PDF documents in Safari without having to install slow and cumbersome third-party plug-ins. The Safari PDF engine lets you zoom in and out and open PDFs in Preview or save them in your Downloads folder.

  • Show pdf with wpg_docload

    I am trying to:
    Call a procedure in the db from Forms (904) through web.show_document, using a DAD, which will save a pdf-report (904) in a blob and after that show it in the new window. I get the pdf-report from a url to the report servers cache.
    The report is saved in the table but when I try to call wpg_docload to show it I get a message from acrobat reader saying that the document doesn't begin with %PDF- but when I store the same pdf-report locally, I can see the %PDF- in the beginning of the file.
    This is what my procedure looks like:
    procedure blob_ex(p_url) is
    v_buffer raw(2000);
    v_buffer_size integer := 2000;
    v_offset integer := 1;
    v_length number;
    v_pieces utl_http.html_pieces;
    v_blob blob;
    v_url varchar2(2000);
    begin
    v_blob := empty_blob();
    dbms_lob.createtemporary(v_blob,true);
    v_pieces := utl_http.request_pieces(p_url,64000);
    for i in 1 .. v_pieces.count loop
    v_buffer := utl_raw.cast_to_raw(v_pieces(i));
    v_buffer_size := utl_raw.length(v_buffer);
    dbms_lob.writeappend(v_blob, v_buffer_size, v_buffer);
    end loop;
    insert into
    blobtable(id, report_file) values
    (seqence.nextval
    ,v_blob);
    commit;
    owa_util.mime_header('application/pdf', FALSE);
    owa_util.http_header_close;
    wpg_docload.download_file(v_blob);
    end;
    Does anyone have a solution on this problem, or can anyone see what I am doing wrong?

    hi
    i want javascript code, which show pdf with bookmark on ios(ipad).
    i am developing a native app in ios with objective c. In my app i need read & show PDF with bookmark.
    So if any javascript availble to read and show, please let me know.
    Thanks in advance for your help.

  • How to show PDF with web.show_document in a separate browser frame (forms10g)?

    I'd like to show PDF in a separate browser frame or in the same window, but at the same time with form screen. So, I'd like to have form in the left and showing pdf in the right. PDF is runing on web.show_document. I understand that this is imposible (btw: does anyone know when it's going to be posible?), but I'd like to figure out if someone have already made some kind of solution?
    Thanks.

    I'd like to show PDF in a separate browser frame or in the same window, but at the same time with form screen. So, I'd like to have form in the left and showing pdf in the right. PDF is runing on web.show_document. I understand that this is imposible (btw: does anyone know when it's going to be posible?), but I'd like to figure out if someone have already made some kind of solution?
    Thanks.

  • Base64 to pdf. After conversion - how to show pdf file ?

    Hello all,
    I have to show and save a pdf file from internal table ion base64 format.
    I mean that I receive an internal table with data in base64 that represent a pdf file. I have
    to convert it into pdf file than show and save the file.
    I maked a conversion by:
      CALL METHOD utility->decode_base64
        EXPORTING
          encoded = encoded
        RECEIVING
          decoded = decoded.
    and, now my question is :
    What I have to do about the string decoded ? I have to append it somewhere ?
    and, how to create a pdf file from decoded string ?
    tks a lot.

    How to show PDF using SAPGui
    Please check my reply in the following thread

  • How do I get Bridge to show PDF's with their dimensions in inches?

    How do I get Bridge to show PDF's with their dimensions in inches?
    I know how to tell Bridge to do it. But it seems the information is not embedded in the PDF's.
    Is there a way to make the PDF's be aware of their size in inches at authoring time?

    I'd like to have Bridge showing PDF dimensions in millimeters. Also dimensions for InDesign and Illustrator files in millimeters. Is this still an upcoming feature? I've been waiting for this since CS3...
    Thanks

  • Apple mail not showing PDFs - just a blue box with question mark

    Hi all,
    For some weird reason my Mail is now showing PDFs as blue box with a "?" in it... not the PDF icon..
    Only happened since the Mavericks upgrade.
    Anyone come across this or got an answer?
    Thanks
    Rob

    No unfortunately not yet. No answers on this one

  • Show pdf with bookmark

    Hi I want to show pdf using javascript and also shoow pdf's book.
    Is it possible to extract pdf book from pdf using javascript?
    Yes then please let me know how i can do?
    thanks in advance for your help.

    hi
    i want javascript code, which show pdf with bookmark on ios(ipad).
    i am developing a native app in ios with objective c. In my app i need read & show PDF with bookmark.
    So if any javascript availble to read and show, please let me know.
    Thanks in advance for your help.

  • My Safari won't show PDF?

    Help...
    My mac won't show PDF files in safari. This means that I have to download every PDF file i come i contact with.
    Does anybody know what is wrong? and what I can do to fix it?

    Open a Finder window.
    Select MacintoshHD in the Sidebar on the left then open the LIbrary folder then the Internet Plug-Ins folder.
    Move the PDF Browser Plug-in and any Adobe plugins to the Trash.
    Restart your Mac. Try Safari.

  • Safari won't view PDFs inline

    Hello,
    I'm trying to make my work computer as Mac-like as possible. But I can't seem to get Safari to display PDFs inline, the way it does on my Macs. They just download like data files.
    Does Windows Safari not support inline PDFs? If it actually does, what can I do to make it work?
    Could the installation of FoxIt Reader, which set itself as the default PDF reader, have affected Safari's settings? When I try to open a downloaded PDF in Safari through Open-File, even that doesn't work. I often have to view dozens of PDFs and it's a drag when they all download to my desktop.

    For the sake of Google, I should answer this.
    So, Foxit reader's plugin does not work with Safari. Getting rid of that overrated program and adding Reader 8 did the trick.
    Unfortunately, you do rely on Adobe for PDF viewing in Windows Safari. A very janky interface as compared with OS X, I have to say.

Maybe you are looking for

  • OCR on Acrobat 9 Pro not working - will not explain why.

    I ran the OCR function on multiple 500-page PDF documents for an upcoming project. For the most part, the OCR worked. However, OCR DID NOT work on specific pages within the documents (would usually happen once or twice every few thousand pages). I we

  • Bright light

    I have a photo with a bright light in the backround how do I soften it.

  • BAPI TO CREATE BUSINESS PARTNER NUMBER

    Hi, I am using BAPI_BUPA_CREATE_FROM_DATA to create Business Partner number . When I am executing the BAPI Business partner number is not getting created in tcode BP. I am passing Partner Category = 2 Central Data = aaa Please Help. Palak Edited by:

  • Assertion Failed alert when exporting in Lightroom 2 BETA

    Please help! I am currently using the Lightroom 2 Beta on a Mac (OS X 10.4.11) and installed a plug-in to allow for a graphical watermark. Unfortunately, the plug-in wouldn't work properly (showed an internal error even though the plug in manager sai

  • About nace transaction

    explain me about nace.give me the steps for modifying existing form using subroutines with syntax.plz.