PDF in IFrame

Hello,
i have created a WD with a iFrame UI. My purpose is to show only the first site of my pdf-document without the functions for scrolling, saving etc.. Is there any way to do this? Until now i used the code below to display the pdf.
regards,
Sharam
     String pdfUrl = null;
     try
          pdfUrl =
               WDWebResource
                    .getWebResource(wdComponentAPI.getDeployableObjectPart(), WDWebResourceType.PDF, "p1.pdf")
                    .getURL();
     catch (Exception e)
          IWDMessageManager manager = wdComponentAPI.getMessageManager();
          manager.reportException("could not get WebResourceURL" + e.getMessage(), false);
     wdContext.currentContextElement().setPdfUrl(pdfUrl); 

Hi Sharam Pourmir,
Try to put the pdf file under your <project name>/src/mimes/Components/<component name>
In the IFrame just write the file's name in the 'src' property (name & extension are case sensitive).
It should work.
Omri

Similar Messages

  • When I try to load a pdf in iframe and I disable PDF toolbar, Its working fine in Internet Explorer and lower versions of Firefox, but in Firefox 19 its not

    When I try to load a PDF inside Iframe and I disable toolar=0 (as guided by adobe). I am able to see the iframe with PDF with no toolbar in IE and lower versions of Firefox (till version 14).
    But in my current version 29, The PDF is visible with toolbar on top.
    Can you please let me know the way to display pdf with no toolbar in Firefox 29?

    I replied on your similar question here: https://support.mozilla.org/questions/1005225

  • Importing PDF into IFrame crashes RH8?

    I'm using RH8 and producing WebHelp. I'm trying to use the new IFrame feature to display a PDF in my webhelp output, but get an Adobe Acrobat error, followed by a RH crash.
    Here's what happening:
    From RH8 topic, insert IFrame and browse to a one-page PDF.
    Click View Selected Item to preview topic. The PDF appears as expected (and it's way cool).
    Generate the WebHelp.
    View the topic in the Webhelp using IE8. The PDF does not appear--just an empty rectangle.
    Go back to RH8 and try to preview the same topic. This time the system hangs with the Adobe Acrobat error:   "Initialization of the font server module failed."
    Press Ctrl+Alt+Del and shut down non-responsive Robohelp.
    Repeat several times with the same results, realize I'm crazy, and post this message here.
    Any ideas?

    Hi Rick,
    Thanks for instructions. I didn't realize you could do that and, in theory, that works like a charm, but I'm still having issues. Here's what I just tried:
    Added a new page to the TOC and linked to the PDF in the baggage files directly. I was still unable to view the PDF in the generated output (nothing happened when I clicked the page in the TOC), but RH8 didn't crash and I didn't see the Adobe error message.
    Inserted a hyperlink in the topic and linked to the PDF file. This time I got the "Initialization of the font server module failed error", followed by a dialog saying "There is a problem with Adobe Acrobat/Reader. Please exit Adobe Acrobat/Reader and try again." But there was no specific instance of Adobe Reader running, just Robohelp. After wating a couple of minutes, RH8 stopped working altogether.
    Created a brand new project in RH8 (Since the other was migrated from RH7) with one topic that contained a hyperlink to a PDF. I could see the PDF in preview mode, but the project froze when I generated the WebHelp output
    Since I just installed RH 8, I suspect that what I'm seeing is more of a problem with how Acrobat and Robohelp are interacting. I had Acrobat 8 Professional installed before installing Robohelp 8. Could that be it? If so, what's the best way to recover?
    Thanks!

  • How to trigger javascript in parent window which opens a pdf in iframe after event (didPrint)

    My main goal is the following:
    1. PHP generates PDF using fpdf <-- OK
    2. javascript: PDF opens in an IFRAME <-- OK
    3. PDF prints silently using emb java <-- OK
    4. After print, call a function in my javascript <-- Problem
    I tried window.onload() in java, but this seems to fire once the window is loaded. Means, that the pdf itself is not loaded and hence the print process has not started.
    I'm currently exploring to use setAction(didPrint, action) to create a robust trigger -
    function AutoPrint($dialog=false)
    //Open the print dialog or start printing immediately on the standard printer
    $param=($dialog ? 'true' : 'false');
    $script="print($param);";
        $script.="setAction('DidPrint', app.alert('test2'))";
    $this->IncludeJS($script);
    So, this prints and generates the alert box.
    But, I'm clueless on how to fire a command to call a function in my java script....
    Help is appreciated.

    If you are using Forms 9i or Patch 9 and above of 6i you can use Jinitiator 1.3.n With this version of Jinitiator you can submit URLs containing JavaScript commands as well as http:// URLs.
    The syntax is web.show_document('javascript:<command>','<target>').
    e.g) web.show_document('javascript:history.back();','_self');

  • Get rid of the "fill & Sign"-pane when opening pdf in iframe

    hi,
    I try to open a pdf in an iframe, but as it is a signed one, the pane "Fill & Sign" opens automatically, reducing the size of my document enormously. As the user can't switch the pane off (the viewer is protected), I want to get rid of this pane.
    I saw some topics changing the registry to disable fill & sign completely, but this is not what I want. If necessary, if should be possible to sign documents using the viewer, but for the files I open in my web site, I want to see them without the pane.
    I use Adobe Reader XI ( 11.0.09).

    You could try this solution posted here http://superuser.com/questions/558692/hiding-tools-comment-and-sign-buttons-in-adobe-reade r-xi.
    In adobe reader installation folder (typically C:\Program Files (x86)\Adobe\Reader 11.0) Find the sub-folder Reader\Services.
    Remove files "DEXEchoSign.spi" and "DEXShare.spi" (I added .bak to the name in mine)
    This removes the Tools and Share toolbar options. I have not found a way to remove "Comment" yet.
    That worked for me in Reader XI, not sure if it will help you with iFrame.

  • Smart Form as PDF within iframe

    Hi all,
    the problem i'm facing today is that i can't display a SMART FORM as a PDF in an <iframe> Tag.
    If i call a simple PDF (which is stored on my PC as a local file) everything works fine and the PDF is
    shown within the iframe Tag.
    <html>
    <head>
    </head>
    <body>
    Test<p>
    <iframe src="C:Test.pdf" width="90%" height="400" name="test"></iframe>
    </body>
    </html>
    If i try to do the same with my test BSP the PDF is not shown within iframe Tag. Instead the iframe Tag
    stays empty and the PDF is called directly by the Adobe Reader and not by my Browser (IE7).
    <html>
    <head>
    </head>
    <body>
    Test<p>
    <iframe src="https://vsapex2ci.daksap.de:44320/sap/bc/bsp/sap/zpdf_test/test.htm"
    width="90%" height="400" name="test"></iframe>
    </body>
    </html>
    On my test.htm only OnInitialization is implemented. Here's the Code:
    DATA: lv_pdf         TYPE xstring,
          ls_output_data TYPE ssfcrescl,
          ls_ctrl_param  TYPE ssfctrlop,
          lv_fm_name     TYPE rs38l_fnam,
          lt_lines       TYPE TABLE OF tline,
          lv_pdf_len     TYPE i.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZTESTPDF'
        IMPORTING
          fm_name            = lv_fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      ls_ctrl_param-no_dialog = 'X'.
      ls_ctrl_param-getotf    = 'X'.
      CALL FUNCTION lv_fm_name
        EXPORTING
         CONTROL_PARAMETERS         = ls_ctrl_param
         USER_SETTINGS              = space
        IMPORTING
         JOB_OUTPUT_INFO            = ls_output_data
    * Conversion of output format OTF into PDF format
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = lv_pdf_len
          bin_file              = lv_pdf
        TABLES
          otf                   = ls_output_data-otfdata
          lines                 = lt_lines.
        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 = 'attachment; filename=test.pdf' ).
        lv_pdf_len = XSTRLEN( lv_pdf ).
        response->set_data( data   = lv_pdf
                            length = lv_pdf_len ).
        navigation->response_complete( ).
    How can i display my generated PDF (SMART FORM) within an iframe Tag?
    Regards
    Mark-André

    here is the code
    data: cached_response type ref to if_http_response.
    create object cached_response type cl_http_response exporting add_c_msg = 1.
      cached_response->set_data( file_content ).
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = file_mime_type ).
      cached_response->set_status( code = 200 reason = 'OK' ).
      cached_response->server_cache_expire_rel( expires_rel = 180 ).
      call function 'GUID_CREATE'
        importing
          ev_guid_32 = guid.
      concatenate runtime->application_url '/' guid into display_url.
      cl_http_server=>server_cache_upload( url      = display_url
                                           response = cached_response ).
      return.
    now in the layout use display_url as the src for iframe
    Raja

  • Pdf in Iframe - Scrolling problem

    Hi,
    We face the below mentioned problem. Would be great if someone could help us.
    Due to problems with uploading the attachment here, please send a email to the following email-id ([email protected]) and I shall send the attachment in response.
    Consider the attachment (pdf_frame.JPG). A PDF is displayed in the iframe indicated in image file. When the PDF is scrolled using mouse scroll wheel the iframe moves Up and Down based on scroll wheel movement direction."
    * Steps to Reproduce:
    1. Execute the IFrameIssue.rar application (Fetch through email).
    2. Scroll the Application
    * Expected Result:
    PDF should only scroll within the IFrame and IFrame should be static.
    * Actual Result:
    Iframe along with the PDF moves UP or DOWN depending on mouse scroll movement.
    * Any Workarounds: None
    Thanks in advance.

    We have come across the same issues and wondered if you had a solution provided on this?  If so could you share.
    Thanks
    Martin

  • Display pdf in Iframe

    Hi
           I have posted lot many threads for this problem but I am not getting the answer.Even I am not finding threads available for the same problem.
           My problem is:
           I have a function module which executes a report at backend and converts it from RTF to PDF text.
          I want to display that PDF in webdynpro as a report it is.
          I have used IWDWebResource still it is not coming.
          I DON'T WANT TO USE INTERACTIVE FORM.
          Is it possible??
          Please reply....
    Thanks
    Prajakta

    Hi Prajakta,
                       Hope these threads will help u
    Download PDF
    u can use either of both solutions.the example bertram has mentioned here is already available here in excel export section
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#58">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#58</a>
    regards
    Sumit
    Message was edited by:
            Sumit Malhotra

  • I can't see an embedded PDF (using iFrames) on my iPad

    My Club's website is built on WordPress and uses a plugin to show an embedded PDF.  On my iPad, (original), it just shows as blank screen but apparently another Member sees the content on her iPad.  Any idea why mine won't show it?

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the region where you are located.
    9. Tap "Done".
    Note: If the change doesn't take effect, sign out of account and sign in again.

  • Showing a PDF with InteractiveForm and IFrame components

    Dear Experts,
    For quite some time we were having several issues while showing PDF Files in WebDynpro Java Components because of different versions of Adobe Readers and mainly because of browsers. Finally I have read about the option to show PDFs using IFrame.
    byte[] PDFFormContent = bytes;
    IWDResource resource = WDResourceFactory.createCachedResource(PDFFormContent, pdffile.getName(),WDWebResourceType.PDF);
    Now this is working for me with Google Chrome, Firefox and IE without a problem. But with different pc clients of my colleagues PDF files are forced to download,when the application is called, instead of showing the PDF file in an IFrame.
    Which setting is deciding to whether download the PDF or showing it embedded? Is there any way to prevent this grammatically?
    Thanks and Regards,
    Koray

    If you are allowed to, you could check Adobe settings on client side.
    Take a look at this:
    See also the official Adobe guide Acrobat Help | Display PDF in browser | Acrobat, Reader XI
    Hope this helps.
    Regards,
    Tobias

  • Submit button to trigger BSP event

    Hi,
      I have a BSP applicaition which is already existing, now I need to integrate a Adobe form for User Interface.. On clicking the Submit button in the Interactive form.. I should trigger an event and at the same time it should call the 'On Input Processing' method of the BSP application.
    Please help me if some one has done it .. or give ur suggestions .. ?
    Thanks
    Sivaraj

    Hello Otto,
    Thanks for the reply,  I created my application refering the above blogs.
    I have BSP Page
    <htmlb:content u2026.>
    <htmlb:page u2026.>
    <htmlb:form>
    <<AREA FOR DISPLAYING ERROR/SUCCESS MESSAGES >>
    << HTMLB Buttons for SAVE/PRINT_PREVIEW/BACK >>
    <iframe src="getPDF.do">
    u201DControl getPDF.do returns Adobe Interactive Form in PDF format
    </iframe>
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    in getPDF.do I'm getting PDF Interactive form as PDF Fiel, Inside the form there is a Save button.
    Currently if I click the save button in Interactive for , only the IFrame & Adobe Form is getting refreshed,
    What I want is 
    On Click of Save button of ADOBE, It should trigger Click event of Save button in BSP Page.
    Is there any script event in Adobe Form to access window.document object of my main page?
    Regards
    Geogy

  • Pdfjs print Ipad

    Am new to pdfjs and am facing wired issue.. When i open web app on desktop print works but when opened on Ipad print doesn't work only blank paper comes out of printer.
    This is how am loading pdf file
    <iframe id="pdfFile" src="http://mozilla.github.io/pdf.js/web/viewer.html?file=' + abc.pdf + '&embedded=true" style="width:100%; height:100%;" frameborder="0"></iframe>

    Hey this was also asked [https://groups.google.com/forum/#!topic/mozilla.dev.pdf-js/QGTcWNtV72w]
    So far asking the developer, and this is a printing issue with the ipad. See [https://github.com/mozilla/pdf.js/issues/3797] Have you updated the library?

  • Links to named destinations in IFRAME positioning the PDF a page and half past

    I created a PDF file w/ named destinations so that I can allow the Internet user w/ browser and Acrobat Reader plug-in to link to specific sections of the PDF. The zoom is set to Fit Horizontally, and the position is the top of the page in my example PDF. I used Acrobat Pro 8.1 to create the PDF.
    Problem is when trying to load the PDF into an IFRAME, displayed with the named destination using a tag like:
    <a href="http://ekensqldev5/ePadmin/documents/Raw.pdf?rand=1000#view=FitH&nameddest=Mission" target="myframe" >Click 1 </a>
    When clicking on the link to the named destination, the .pdf is loaded or reloaded into an IFRAME and the page with the named destination is usually correctly displayed. Only in IE 6,7,8 the pdf will frequently (about 1 out of 4 times) be positioned a page and a half past the named destination.  Clicking to a different link, and then back to the original link will usually reposition the PDF correctly. Chrome and Firefox always position the PDF exactly to the named destination.  I'd like to know how to create the named destination so that it will always be positioned correctly, or to use a different link that will always position correctly.  I'm using Reader 9.1.2
    HTML:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    </head>
    <body>
    <p>
    <a href="http://ekensqldev5/ePadmin/documents/Raw.pdf?rand=1000#view=FitH&nameddest=Mission" target="myframe" >Click 1 </a> <p>
    <a href="http://ekensqldev5/ePadmin/documents/Raw.pdf?rand=1100#view=FitH&nameddest=Highlights" target="myframe">Click 2 </a> <p>
    <a href="http://ekensqldev5/ePadmin/documents/Raw.pdf?rand=1200#view=FitH&nameddest=Trustees" target="myframe">Click 3</a> <p>
    <a href="http://ekensqldev5/ePadmin/documents/Raw.pdf?rand=1201#view=FitH&nameddest=Statement_of_Op erations" target="myframe">Click 4</a> <p>
    <a href="http://intranet" target="myframe">Click 5</a> <p>
    <iframe name="myframe" width="100%" height="800">
    </iframe>
    </body>
    </html>

    I'm working with Lyle on this, and I have done some additional testing.
    What I found is that the positioning for named destinations seems to work ok with IE8 when the html page and pdf file are located on one of our external web servers (rather than local intranet servers).
    I am wondering if this is due to the latency involved in downloading the file, allowing the DOM to register the plugin?
    I've posted a query at Microsoft's forum, but they are pointing me back to Adobe...saying they cannot know how the plugin handles rendering...even though I responded that it seems to work across the board with Firefox and Chrome.
    Here is my thread in the Microsoft forum.
    Erratic Behavior with PDF named destinations
    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/4f6adaa2-de8f-47d6-b e4b-444edfdd26d7/

  • Inline XML Publisher PDF rendered using IFRAME in Self Service

    Hi,
    We have created an XML Publisher Report (PDF) which renders inline in a SelfService Page.
    When we click on the Save Icon in the IFRAME, The File Name is really long including the Applications URL, DBC File, File Name etc.
    Ex: http___it21.marvell.com_8005_OA_HTML_xdo_doc_display.jsp_dbcName=it21_devt&fileName=MVL_HR_EMP_APPRAISAL_DETAIL-1163094244_out.pdf.pdf&mFileLength=50068&p_output=_devt_prod_prodcomn_html_fwk_t_MVL_HR_EMP_APPRAISAL_DETAIL-1163094244_out.pdf
    The requirement is to change the File Name to PerformanceAppraisal.pdf
    Below is the code used to render the inline PDF.
    - The XMLString has the complete XML generated.
    public void renderInlinePDF(OAPageContext pageContext, OAWebBean webBean, OAApplicationModule am, String XMLString, String templateName)
    System.out.println("---MVLReviewPerformanceXMLUtil.renderInlinePDF----------------- XMLString "+ XMLString);
    System.out.println("---MVLReviewPerformanceXMLUtil.renderInlinePDF----------------- templateName "+ templateName);
    BlobDomain xmlData = new BlobDomain(XMLString.getBytes() );
    pageContext.writeDiagnostics(pageContext, "------------- xmlData : "+xmlData.toString(), 4);
    pageContext.writeDiagnostics(pageContext, "------------------------------------------------------------------- ", 4);
    String redirectURL = null;
    try
    pageContext.writeDiagnostics(pageContext, "------------- redirectURL 1 : "+redirectURL, 4);
    redirectURL = DocumentHelper.getOutputURL(
    pageContext
    ,"XXGT"
    ,templateName
    ,xmlData.getBinaryStream()
    ,"PDF"
    ,null
    ,"en"
    ,"US"
    pageContext.writeDiagnostics(pageContext, "------------- redirectURL 2 : "+redirectURL, 4);
    System.out.println("---MVLReviewPerformanceXMLUtil---------------------------- redirectURL = "+ redirectURL);
    catch(Exception e )
    throw new OAException("Error in redirect");
    OAHTMLWebBean frame=(OAHTMLWebBean)webBean.findChildRecursive("IFRAME");
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME is NULL"+frame, 4);
    if (frame == null)
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME is NULL", 4);
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean(pageContext,HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src",redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","PerformanceReview");
    outRegion.setHTMLAttributeValue("name","PerformanceReview");
    OAWebBean iFramePlaceHolder = (OAWebBean) webBean.findChildRecursive("IFrameRegionPlaceHolder");
    iFramePlaceHolder.addIndexedChild(outRegion);
    // pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME AddIndexedChild", 4);
    XML Publisher version 5.6.3
    Any help in this regard will be highly appreciated.
    Thanks,
    Sujay

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • How to open a PDF file in a iFrame using JSP

    I'm developing a EDM system and I need to upload a PDF file and later show it on the browser but in a iFrame.
    as the file is not in the system directory but into server directory.
    I tryed JavaScript: document.location.href="file://directory"; because after uploading i'd like to open it automatically
    but it doesn't work in Windows XP SP 2.
    I'd like to do that not using javaScript but JSP or servlet.
    Does some one can help me. I'll be very glad

    <%
                        out.println("<html><body><iframe src="URL2PDF">You\'re browser doesn\'t support iframes<iframe>")</body></html>");
    %>Something like that should work. Bunch of ways to make it happen; I jsut took this from my error catch and added your iframe tag instead of my <%
              catch(Exception e)
                        out.println("<html><body>");
                        out.println(e.toString());
                        out.println("<h3>first error catch on tenant editor 2</h3>");
                        out.println("</body></html>");
    %>

Maybe you are looking for