How to close PDF form in Browser

Hi,
Does anyone knows if there are any way to close a PDF form that is opened in a browser (Internet Explorer 6)?
In my form, there is a button that is supposed to close the form when clicked, it is working if I launched the form in Reader but does not work in a browser.
The script that I used in the click event of the button is:
event.target.closeDoc();
Thank you.

Hi,
heres the code
1. Go to <Your Webdynpro project> - WebDynpro - Web Dynpro Components - <your component> - Windows right click and create a window (PdfWindow).
2. Place the view that contains pdfForm in the window PdfWindow.Create a button in the view say ClosePdf .
3. Create a context attribute say WindowInstance of type com.sap.tc.webdynpro.clientserver.window.Window (java native type) in the component controller.Map this attribute to the context of both views (view with button and Pdfview)
3. In the onAction of button
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("PdfWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
window.setWindowPosition(500, 500);
window.show();
wdContext.currentContextElement.setWindowInstance(window); // this iwll bw used to destroy the pop up
4. In Pdfview create a action closepopup and associate with button ClosePdf. In the action write
IWDWindow window = wdContext.currentContextElement.getWindowInstance();
window.destroy(); // this will close the popup.
Note:
you dont need wdContext.currentContextElement().setPdfVisible(WDVisibility.VISIBLE); as your pdfform is in different view.
Message was edited by:
        Shriram Kabra

Similar Messages

  • How to protect t save pdf form from browser

    Is it possible to ptotect to save pdf form from browser?
    If so how can I do?

    try:
      In the pre-save event:
    xfa.event.cancelAction = true;

  • I HOW I FILL PDF FORM WITH HEBROW ON CHROME ?

    I HOW I FILL PDF FORM WITH HEBROW ON CHROME ?

    Chrome uses its own (incompatible) PDF viewer.
    Download the PDF to your local disk, then fill it from there with Adobe Reader.  Or use a browser that uses the Adobe PDF plugin.

  • How to save Pdf form localy without internet

    How to save Pdf form localy without internet?
    I thought in the beginning about advanced user rights and pure saving them on adobe reader but i saw legal notes about 500 user who can legaly save it localy and answer to me (bu they can`t answer to my client who paid me for doing this form).
    Other thing is to do Air Application which would collect data from Pdf Form and save it (localy without internet) to use it later.
    I thought about that second possibility but i can`t find any clue to do it myself.
    Any help will be appreciated...

    Hi,
    Are you downloading responses as PDF forms after forms are submitted? If so, FormsCentral doesn't provide an option to exclude empty fields and you won't be able to save PDF forms without empty fields.
    You can use this form to "vote" on popular feature requests, or to add a new one of your own:
    https://adobeformscentral.com/?f=XnF-KJVCovcEVQz9tZHYPQ
    Thanks,
    Wenlan

  • How to create pdf forms in wda

    how to create pdf forms in wda

    hi,
    check these links
    https://www.sdn.sap.com/irj/sdn/adobe
    https://www.sdn.sap.com/irj/sdn/interactiveforms-elearning
    http://help.sap.com/saphelp_nw2004s/helpdata/en/37/47a2be350c4ac8afe36b691203971f/frameset.htm
    The following links contain all the detailed information (PDF & PPT docs) on Adobe Interactive Form with examples which wil make u'r learning easier:
    https://www.sdn.sap.com/irj/sdn/adobe
    Improving the Performance of Adobe® LiveCycleu2122 Designer Forms(scripting)
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_perf_guidelines.pdf
    Interactive Forms Based on Adobe Software: Overview
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e635e290-0201-0010-a9be-9e8e4ce04770
    Adobe Interactive Forms
    http://www.saplounge.be/Files/media/pdf/Huberland-Interactive-Forms-2007.10.10.pdf
    Taking interactive forms to next level
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8c103c36-0301-0010-cda8-f6b381bedb6e
    Introduction to Adobe PDF Library SDK(PDFL SDK)(Simply scroll the document)
    http://partners.adobe.com/public/developer/en/webseminars/PDFL_WebSeminar.pdf
    Creating Interactive forms in webdynpro for java
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1
    PDF-Based Print Forms/SAP Interactive Forms by Adobe
    http://help.sap.com/saphelp_nw04s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
    Date Objects in Adobe Designer
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/60694fddb74ad88cdb7d2a094f3dd2/frameset.htm
    Checking and Testing a PDF-Based Print Form
    http://help.sap.com/saphelp_nw04s/helpdata/en/c2/1fe9aa4d7b413e8515f90b73729e97/frameset.htm
    Architecture
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/21021b911f4c0cae11459a4ce0bc62/frameset.htm
    http://www.nl4b.com/Adobe/Invitation_SAPBrussels_Q407.pdf
    Yogesh N

  • How to do pdf form from doc in Formscentral

    Hi,
    I would like to know how to make pdf form in formscentral with doc file

    You will have to use Acrobat to convert from doc to PDF, add the fields in Acrobat, and upload to the FormsCentral service. If you don't know how to do any of this, post again and let us know which steps you need more help with.

  • How to close infopath form through code?

    Hi All,
    How to close infopath form through code, thanks in advance!

    Hi Sam,
    Please check if the articles below can be help:
    http://www.bizsupportonline.net/browserforms/programmatically-submit-infopath-form-sharepoint-send-email-close-form.htm
    http://www.bizsupportonline.net/blog/2009/01/how-to-programmatically-run-code-close-infopath-web-form/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to make PDF forms work in DreamWeaver

    How to make PDF forms work in Dreamweaver

    Look at DW's starter pages called "liquid" (FILE | New > Blank Page > "2 column, liquid" etc., or Google "liquid layouts".

  • How to save PDF form without empty fields ?

    Hello,
    I try to find how to save PDF forms after a school registration but without empty fields because i have lots of relation in my Form but i haven't.
    Is it possible and how ?
    Thanks

    Hi,
    Are you downloading responses as PDF forms after forms are submitted? If so, FormsCentral doesn't provide an option to exclude empty fields and you won't be able to save PDF forms without empty fields.
    You can use this form to "vote" on popular feature requests, or to add a new one of your own:
    https://adobeformscentral.com/?f=XnF-KJVCovcEVQz9tZHYPQ
    Thanks,
    Wenlan

  • Close PDF Form in IE Browser

    Hi,
    Does anyone knows if there are any way to close a PDF form that is opened in a browser (Internet Explorer 6)?
    In my form, there is a button that is supposed to close the form when clicked, it is working if I launched the form in Reader but does not work in a browser.
    The script that I used in the click event of the button is:
    event.target.closeDoc();
    Thank you.

    Hi,
    I'm looking at the Javascript reference now. The document does not mention anything about closing the form in an external viewer like a browser.
    I've also tried the same form with Reader Extensions rights added to it, but the outcome is the same.
    According to this thread, post #88
    http://www.adobeforums.com/webx/.3bbe87bf/87
    It was mentioned that "Note that this method is only available when the form's host is Acrobat." Does it mean that if the form is viewed in a browser using Acrobat it will not work also?
    Thank you.

  • How to access PDF file in Browser

    Hi All,
    I am using Oracle Application 11.5.10.2 and i want to display a pdf file in the output of browser which is stored in the location "/USR/TMP" of Application server.
    This is default path of "UTL_FILE_DIR" which is set.
    In this path a pdf file is there ie; abc.pdf
    So i want to display this pdf file in Output front end.
    what i have done is Written a sql script embedded html in that
    code is as follows:
    DECLARE
    str varchar2(1000);
    BEGIN
    /*********** Determines the mime type for the document to be displayed***********/
    select '<html>
         <body leftmargin=0 topmargin=0 scroll=no>
         <embed width=100% height=100% fullscreen=yes
         src="/usr/tmp/abc.pdf">
         </body>
         </html>'
    into str
    from dual;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,str);
    EXCEPTION
    when others then
    FND_FILE.PUT_LINE(FND_FILE.LOG,SQLERRM);
    END;
    But if in (src="/usr/tmp/abc.pdf">) if i am giving local path
    ie;(src="file:///C:/Documents%20and%20Settings/Desktop/abc.pdf">
    the pdf is displayed in output.
    Can anyone help me out for the best possible solution for this.
    Thanks!!

    Can you open the pdf file in the reader without downloading it?
    ie is the file form.pdf a valid pdf file?
    How big a PDF are we talking about here? Rather than reading the whole thing into memory, I would suggest you stream things a little.
    You are doing this in a servlet right? Not a JSP?
    JSPs can add extra carriage returns, and thus corrupt the file you are sending.

  • How to call pdf forms developed in ABAP from WD Java application?

    Hi
    I have a web dynpro ABAP application that that is responsible for generating PDF forms for all other applications (WD ABAP and WD Java).
    How can I call the pdf forms generated by the WD ABAP application from WD Java application in a separate window?
    These forms are to be called on click of a "Print" button. Also, these forms are non interactive.
    Kindly let me know if you need any other information.
    Regards
    Vineet Vikram
    Edited by: vineet vikram on Jun 24, 2009 7:28 AM

    in addtion to Nikhil's response. you can write following code on action of print button:
        IWDWindow window = wdComponentAPI.
            getWindowManager().createExternalWindow(
                  "<ABAP Application URL>",
                  "<Title for window>",
                  false);
       window.open();
    to Close the application, you can use the window close or u can fire an event to close current window.
    Abhinav

  • How to open pdf files in browser using flex

    hi,
    my project is having a Document explorer wchich contains pdf
    files,iwant to open it in the browser.can any one tell me how to
    open pdf documents using flex programming(i tried with different
    thing like swf's but my client wants only pdf formatt).

    Another option is by calling a JSP page. This example will
    open a pdf file into a new browser without displaying the download
    "save" prompt.
    Function to call the JSP:
    private function downloadFlyer(event:Event):void {
    var jspLink:URLRequest = new
    URLRequest("jsp/downloadpdf.jsp?fileName=Fundraiser_flyer_2008.pdf");
    navigateToURL( jspLink, "_blank" );
    JSP code:
    <%@ page errorPage="error.jsp" %>
    <%@ page import="java.io.*" %>
    <%
    //Get the parameters
    String downloadFileName=request.getParameter("fileName");
    String fileName = application.getRealPath("/downloads/" +
    downloadFileName);
    File file = new File(fileName);
    if (!file.exists()) {
    throw new IOException("File does not exist.");
    // Get the size of the file
    long length = file.length();
    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
    throw new IOException("File too big.");
    response.reset();
    response.resetBuffer();
    response.setContentType( "application/pdf" );
    response.setHeader ("Content-Disposition", "filename=" +
    downloadFileName);
    //Prevent the Java error: "getOutputStream() has already
    been called for this response"
    out.clear();
    out = pageContext.pushBody();
    InputStream in = new FileInputStream(file);
    OutputStream output = response.getOutputStream();
    try {
    int curByte=-1;
    while( (curByte=in.read()) !=-1){
    output.write(curByte);
    } catch (IOException ioe) {
    ioe.printStackTrace(System.out);
    } finally{
    output.flush();
    in.close();
    response.flushBuffer();
    %>

  • 2 Problems with PDF Forms:  Import and Launcing PDF Form in Browser

    We are installing SAP sersion 2004s and I have encountered 2 problems while working through several tutorials.
    1.  When Adobe Designer opens from the layout in SE80, the IMPORT option (under TOOLS) does not appear.  Is there an installation step(s) missing?
    2. I created a simple Adobe Interactive form based on T. Jung's demo (but without the imported PDF form).  Enabled is on and the binding is ok; yet, when I test the application the browser displays only a blank screen.  Other Web Dynpro for ABAP tutorials have worked fine, but not the Adobe Forms.  Again, is there an installation step(s) missing?
    regards,
    john

    First make sure that you have the correct version of the Adobe Lifecycle Designer installed.  I am running 7.0.050519.0.  There are some OSS notes on how to upgrade to the 7.X version of the designer.
    On the second problem, you probably don't have the correct version of the ACF installed.  The ACF (Active Control Framework) is only used when running Interactive PDF documents - not print version ones.  Have a look at OSS note 766191 and 846952.  I had to uninstall my current ACF and install the 04S SP7 version (according to the two notes listed) before I could build the demo in question.

  • How to Close InfoPath Form After Submission When Two Buttons Exist?

    I have an browser-enabled InfoPath 2010 form that has two views and a submit button on each view. The form would correctly submit and close the form using one button on the form until the second button was added. After adding the submit button on a second
    view, the second button submitted/closed but the behavior on the first view changed so that the form no longer closes after submission. I’ve researched this and have not yet found a solution to allow closing the form after submission for one of the buttons.
    Things I’ve tried:
     - I’ve attempted creating multiple submit data connections for the different buttons
     - Specifying different Submit Options
     - Try closing the form with the code
     - Add another button to the non-closing view
     - Add duplicate Rule actions to "Close this form: No Prompt"
    Settings:
    Button rules:
     - Submit using data connection: SharePoint Library Submit
     - Close this form: No Prompt
    Button Properties:
     - Action > Rules and Custom Code
    The form Submit Options:
     - Send form to a single destination (a form library)
     - Choose a data connection for submit (SharePoint library submit)
     - Advanced > After Submit: Close the form
    Advanced form options:
     - Filler Features: all items unchecked (not allowing Save, etc.)
     - E-Mail Attachments: uncheck Enable InfoPath e-mail form functionality for this form template
    Resources:
    When considering programmatically submitting and closing the form, I understand from this article that the Rules run before code and I can’t close the InfoPath form programmatically by writing code behind a button that has a rule set on it:
    http://www.bizsupportonline.net/blog/2009/01/how-to-programmatically-run-code-close-infopath-web-form/
    Discussion of creating a custom Save and Submit buttons for InfoPath browser forms:
    http://markhaverty.com/sharepoint/custom-save-and-submit-buttons-for-infopath-browser-forms/

    what if you need to switch views? 
    I have the same problem in a similar situation.  I created a test button to narrow down the cause.  the button submits data & closes the form fine.  however when I add a rule to switch views before the submit & close rule, it
    breaks.  Submit still works but it no longer closes the form.  If I disable the switch-view rule, then it closes fine. 
    I tried added another rule to switch back to the main view but that didn't help. 
    switching views is an integral part of the workflow b/c I want to email the alternate view upon approval & then close the form.  So removing that rule is not a good answer unfortunately. 

Maybe you are looking for