Execute a PDF fromJavascript

I am trying to use a javascript function to execute and load a pdf file. Can anyone help with how I might go about this?
Thanks.

Are you asking how to view a PDF document within a web page?

Similar Messages

  • What about executing a .pdf or what other files from a jar?

    Yesterday I started a topic for how I can use files that are situated in my project .jar file.. we discussed this problem and finally a solution has been proposed in the bellow link
    http://forum.java.sun.com/thread.jspa?threadID=788322&tstart=0
    and
    http://forum.java.sun.com/thread.jspa?threadID=788381&tstart=90
    After all the discussions I have undrestood that we can not use File class and we should use URL to give the path of a file but what if I need to execute a PDF file by clicking an icon or button? For this either I need to used File or string of this file which does not work! it means that if I have an .jar application that wants to give a link to a .PDF file (which is situated in the same .jar file) I can not do that??
    to execute this pdf. file I use:
    Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + getClass().getClassLoader().getResource("docs/theory.pdf").toString); //the path to the file name on stringor
    Desktop.open(new File("docs/theory.pdf")));but neither works the .jar file can not find the file..
    What do u propose?? does any one has any idea??
    Thanx for helping and participating

    hi!
    just another suggestion.. why don't you extract the .pdf file into a temp directory, and then Call the Desktop.open(new File("docs/theory.pdf"))); , the other snap is i think OS dependent, and violate the platform independency law.
    :)

  • How to execute create PDF  menu item

    hi all,
    I need to bind two pdf files.
    I did that by using File->Create PDF->From Multiple Files option.
    I want to automate this work using javascript.
    How can i do this?
    How can i execute the menu item Create PDF?
    Thanks in advance and urgent please....

    For the Acrobat SDK, no, it is not possible because there is no API to allow developers to do so via AppleScript. Now on to the world of "unsupported".
    It "might" and I do stress the word *MIGHT* be possible via AppleScript System Events, but this is in all worlds is a VERY BAD way to do things. It requires that no other applications running in the foreground and if your application loses focus for another applications dialog box (i.e. Adobe Updater, Mac OS X Software Update, etc...) you are, what some might say "hosed" because then your AppleScript no longer can execute properly. Surely NOT something to be used in a production environment.
    Sabian

  • Removing the "Security Warning" dialogue box on default when a PDF is opened

    Hey
    I have created a pdf document with a specific data written using iText Libraries. I have actually created a beacon that generates a notification sent to the owner's email when the pdf is opened.
    The code is under OpenAction. The problem I am facing is that as I open the document, a dialogue box is opened saying "Security Warning" The document is trying to connect to : URL. How do I get rid of this dialogue box. ? I don't want this dialogue box to appear and allow the connection by default. I have tried playing with the Trust Manager - but that doesn't seem to be the solution, as  am trying to execute my PDF document at a remote machine.

    There was a lot of media fuss years back when it was found out that PDF files could "phone home", i.e. do what you want to do. So Adobe put this warning in. It wouldn't be much good as a warning if the creator of a PDF could choose to turn it off!
    Document creators like to track people opening documents. Privacy advocates consider this a breach of privacy. The latter group shouts louder. http://en.wikipedia.org/wiki/Phoning_home

  • Problem with deleting PDF report in "Vew Log / Trace" Section

    Hello everyone I just hired as a peoplesoft programmer :)
    I have a question when I try to code a report generating program
    I need to delete the PDF file (report) in "View Log/Trace"Section after the AE program executed.
    (Actually I just want to hide it at "View Log/Trace" Section, so that user will not be able to see it).
    The following program is my code
    &xmlStr = &inXMLDoc.GenXmlString();
    &strFilePath = %FilePath | "PAYSLIP_" | ZH_GPR068_AET.CAL_RUN_ID | "__" | ZH_GPR068_AET.PROCESS_INSTANCE | ".xml";
    &FileCS = GetFile(%FilePath | "PAYSLIP_" | ZH_GPR068_AET.CAL_RUN_ID | "__" | ZH_GPR068_AET.PROCESS_INSTANCE | ".xml", "W", "UTF8", %FilePath_Absolute);
    sRptDefn = "GPR0688_B";
    &oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sRptDefn);
    &oRptDefn.Get();
    &oRptDefn.UseBurstValueAsOutputFileName = True;
    &oRptDefn.SetRuntimeDataXMLFile(&strFilePath);
    &ftp = GetURL(URL.ZH_GPR068_PAYSLIP);
    &oRptDefn.ProcessReport("", &sLangCd, &AsOfDate, &sFileExt);
    &oRptDefn.ZHPrintOutput(%FilePath);
    &Return_Value = PutAttachment(GetURL(URL.ZH_GPR068_PAYSLIP), &sss | ".pdf", %FilePath | &sss | ".pdf");
    &conFileLog.WriteLine("PutAttachment Return Value:" | &Return_Value);
    If &Return_Value = 0 Then
    Local Record &ZH_PSLP_EE;
    &ZH_PSLP_EE = CreateRecord(Record.ZH_PSLP_EE_DATA);
    &ZH_PSLP_EE.EMPLID.Value = ZH_GPR068_AET.EMPLID;
    &ZH_PSLP_EE.CAL_RUN_ID.Value = ZH_GPR068_AET.CAL_RUN_ID;
    &ZH_PSLP_EE.ATTACHSYSFILENAME.Value = &ATTACHSYSFILENAME;
    &ZH_PSLP_EE.ATTACHUSERFILE.Value = &ATTACHUSERFILE;
    &ZH_PSLP_EE.Insert();
    End-If;
    /*Delete(hide) the report file*/
    Local JavaObject &javaFile;
    &javaFile = CreateJavaObject("java.io.File", %FilePath);
    &javaFile.delete();
    &tmpfile1 = GetFile(%FilePath | &ATTACHSYSFILENAME, "W", "UTF8", %FilePath_Absolute);
    &tmpfile1.Delete();*
    /*Delete(hide) the report file*/
    After the program executed, the pdf report still exist and not being removed in "View Log/Trace" Section
    &ATTACHSYSFILENAME already contain the PDF extension.
    I am hoping someone can help me to find out what's wrong with my program results in cannot delete the PDF file in the "Vew Log / Trace" Section
    Thank you so much
    Edited by: 969461 on Nov 5, 2012 1:41 AM

    Maybe there's something I don't get very well, but that's quite strange to make a user able to run a process without making him able to see the report, or at least the log.
    Anyway, I think it should be better to solve it through the config rather than changing code.
    Have a look to the red-paper below, page 57 :
    http://download.oracle.com/peopletools/documents/Securing_PSFT_App_Environment_May2010%20v4.pdf
    I may be wrong, but I'd tend to have a look first on the process definition, "Process Security", or on permission list (process monitor)...
    Nicolas.
    Edited by: N Gasparotto on Nov 5, 2012 12:51 PM

  • From form calling report to result to pdf file

    Dear All,
    Usually, when we call a report from form, it calls to preview. Now, I would like to autometically call the report and upon execute, the pdf file will be created. Can anybody tell me how to do that.
    p/s: I do not want the preview becasue this report is a complicated report and it takes quite some time to process. So I would like my user to get the pdf directly instead of going though the preview.
    Thanks

    DECLARE     
    pl_id ParamList;
    Begin
    pl_id := Create_Parameter_List('Reports_Parameters');
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'FILE');
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,'C:\aRep1.Pdf');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');
    RUN_PRODUCT REPORTS,'C:\Rep1',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_ID);
    Destroy_Parameter_List(pl_id);
    End;

  • Po converted in pdf file

    Dear Experts,
    Pls, explain me how to convert purchase order in pdf file.
    Get spool request in SP01
    Then go to SE38. Program name: RSTXPDF4 Execute.
    Give the spool number & execute.
    PDF will be created for PO.
    In this process there are three steps.  Any short process pls,  explain .
    Thanks & Regards,
    Ranjeet

    Hi,
    I have a Z function module which takes PO number as input and output will be OTF format of purcahse order. we can then convert the otf into pdf .. The FM ECP_PO_PDF_CREATE is used to create po into pdf.. but it dosent seems to work..
    please let me know if you need the details of teh Z function  module.

  • PDF Preview not working in Workspace

    Greetings
    Attempts to execute the PDF Preview command in Workspace result in 'PDF has not been configured for this web server.'
    The Hyperion S9 BI+ 9.3 Financial Reporting Print Server service was configured to use AFPL Ghostscript 8.51 and was started prior to attempting the command.
    Ghostscript itself is installed and tested working.
    Checked Workspace's MIME types library and found '.pdf' already mapped to 'application/pdf'.
    Read the installation and configuration guides and found no clues as to what may be preventing the print server from generating the PDF preview.
    Went through the log files under folder %HYPERION_HOME%\BIPlus\logs, %HYPERION_HOME%\logs\BIPlus, and MS IIS's, but found nothing.
    Any ideas on diagnosing and troubleshooting this issue?
    Thanks!

    I believe the supported version for ghost script is 7.0.6; I had the same problem and after installing the lower version it worked like a charm.
    If you cant find the older version let me know, I'll email it to you or place it in my website.

  • Opening PDF Document in New Window

    Hi,
    I have requirement to open pdf document in new window. I'm using Travel Expense form. I'm using the FM PTRM_WEB_FORM_PDF_GET. When I give 'X' to i_display_form, it displays the pdf document in same session or window. But I would like to open the pdf file in new window.
    The FM gives me pdf data of type RAWSTRING. Is there any FM or class where I can pass this data and open it in New Window.
    Can anyone please suggest on this.
    Regards,
    JMB

    download it using  gui_download and use cl_gui_frontend_services=>execute to execute that pdf file

  • Issue with emailing dynamically generated PDF (InteractiveForm UI element)

    Hi Experts ,
    I have a requirement according to which i need to generate PDF dynamically using webdynpro java and email the dynamically generated PDF.
    I am facing issue while emailing the dynamically genarated pdf.
    It gives me an exception :
    nested exception is: javax.mail.MessagingException: IOException while sending message;  nested exception is: java.io.IOException: no data
    This is because its unable to get the binary data (byte array) of the dynamically generated PDF which is required to send mail.
    Could some one suggest me how to fetch the binary data of the dynamically generated PDF.
    For dynamic PDF generation i am using dynamic generation of UI element   InteractiveForm UI Element 
    In case of static PDF (i.e. the PDF genarated by inserting the InteractiveFrom Ui element on the view using the insert child option) we do set the pdf source property of Interactive Form UI element to a context variable attribute of type binary but  my problem is ,how to set the PDF source of a dynamically generated Interactive form UI element to a context variable attribute of type binary ..
    Any help would be highly appreciated.
    Regards ,
    Navya

    Hi Frank ,
    the code to generate PDF dynamically is written in the WdDoModifyView section of the view as the PDF need to be generated dynamically., i.e. by adding InteractiveForm UI elements at  runtime.
    I tried the code suggested by you  but i gave mean exception.
    errorjava.io.FileNotFoundException:
    (The system cannot find the path specified)
    Kindly let me know where i am going wrong .
    Below is the code that i  had written in a separate method m_mail().
    This would take as input the name of the dynamically generated data node and is called from the wdDoModifyView section of the view
    public void m_mail( java.lang.String p_dynamicnodeName )
                   ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
              //        This would need to have the Templatefile in the Mimes-Directory of the Webdynpro-Component
                   String templateUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "AdobeView1_InteractiveForm.xdp");
                   InputStream templateSourceInputStream = new FileInputStream(templateUrl);
                   IOUtil.write(templateSourceInputStream, templateSourceOutputStream);
                   IWDPDFDocumentCreationContext pdfContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
                   pdfContext.setData(WDInteractiveFormHelper.getContextDataAsStream(wdContext
                   .nodeCtx_vn_dynmcnd()
                   .getChildNode(p_dynamicnodeName, IWDNode.NO_SELECTION)));
                   pdfContext.setTemplate(templateSourceOutputStream);
                   pdfContext.setInteractive(false);
                   IWDPDFDocument pdf = pdfContext.execute();
                   if (pdf != null) {
                    pdfArray = pdf.getPDF();
    Kindly let me know where am i going wrong.
    Regards ,
    Navya

  • Problem displaying PDF in BSP

    Hi All,
    With the help of Craigs Blog
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    I coded a BSP to display PDF from a spool number.
    I did everything mentioned in the blog. When i execute, the pdf gets displayed, however the data is some unconverted junk data. Can any one suggest what i am doing wrong here.
    Heres the coding in the Event handler (OnInputProcessing) :
    DATA: radioButtonGroup TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD.
    DATA: cached_response TYPE REF TO if_http_response.
    DATA: response TYPE REF TO if_http_response.
    DATA: guid TYPE guid_32.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    file_name      = fileUpload->file_name.
    file_mime_type = fileUpload->file_content_type.
    file_length    = fileUpload->file_length.
    file_content   = fileUpload->file_content.
    radioButtonGroup ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'display_type'
                           name    = 'radioButtonGroup' ).
    display_type = radioButtonGroup->selection.
    IF display_type = 'convertspool'.
      DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = 0002344365
          NO_DIALOG                = 'X'
        TABLES
          PDF                      = witab
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 8
          ERR_BTCJOB_SUBMIT_FAILED = 9
          ERR_BTCJOB_CLOSE_FAILED  = 10
          others                   = 11.
      if sy-subrc EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output.
        ENDLOOP.
    ****Convert the Character String to Binary String
        data: r_string  type string.
        data: R_XSTRING type xstring.
        call function 'SCMS_STRING_TO_XSTRING'
          EXPORTING
            text   = output
          IMPORTING
            buffer = outputx.
        CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING
    add_c_msg = 1.
        l_pdf_len = xstrlen( outputx ).
        cached_response->set_data( data   = outputx
                            length = l_pdf_len ).
        cached_response->set_header_field( name  =
    if_http_header_fields=>content_type
                                           value = 'application/pdf' ).
        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 '.pdf' INTO
    display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
      ENDIF.
      RETURN.
    ENDIF.
    Regards
    Sri

    With the help of some other posts and blogs.. am able to display the pdf now.
    However, the default magnification(zoom) is always 44.5%. Any ideas as to how this can be increased or set to a default value.
    Sri

  • PDF format PO send to Vendor

    Hi,
    Once we created ME21N or released the PO from ME29N, system should sent a mail with attachment of PO in PDF format to Vendor,
    1) If vendor did not get the mail or attachment, then Buyer should get the mail,
    2) if Buyer get the mail. he will process the mail once again , send the email to vendor with attachment.
    3)How we come to know about the vendor has successfully received the mail with attachment of pdf format PO.?
    How we proceed this development and how to get?

    Hi,
    Check Sap note 191470
    Goto NACE .
    u2022 Select EF and click on OUTPUT TYPES.
    u2022 Then select Output Type NEU and click on processing routines .
    u2022 In that you have to add a new entry - medium 5 .
    u2022 Then you need to assign a program, form routine and form.
    u2022 You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
    u2022 Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
    u2022 For subject of the mail goto Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
    u2022 Under General data -> Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE .
    u2022 Now the subject will be PO No. 1800004202.
    u2022 You need to maintain your email id in tcode SU01 and also the vendor's email id.
    u2022 Now while creating a new purchase order , change the medium to External Send .
    u2022 Then goto Communication Method and select CS01 . ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
    u2022 Goto tcode ME9F .
    u2022 Execute.
    u2022 Select the checkbox and click on Output Message.
    u2022 You will get a message MAII 00000000000123 generated.
    also check,
    go to MN04
    here give the condition as NEU
    choose key combination as Purchasing Output Determination: Document Type
    select doc type and partner function as VN vendor mediuam as 5 external send
    select communication here strategy give as CS01
    For subject of the mail go to Mail Title and Texts. In title give PO No. &EKKO-EBELN&
    Also if you want to convert PO in PDF format :
    Get spool request in SP01
    Then go to SE38. Program name: RSTXPDF4 Execute.
    Give the spool number & execute.
    PDF will be created for PO.

  • Displaying a PDF for a form on web browser in  Web Dynpro Abap

    Hey
    I have a form (a set of input elements) on a view
    Now i want that as soon as i press execute , a pdf form is displayed with the values entered on the view.
    Thanks
    Shivi Goel

    Hi ,
    you can refer below links for interactive forms.
    [http://www.sdn.sap.com/irj/scn/logon?redirect=https%3a%2f%2fwww.sdn.sap.com%2firj%2fscn%2finteractiveforms-elearning]
    [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/frameset.htm]
    [http://wwwimages.adobe.com/www.adobe.com/enterprise/partners/pdfs/solution_in_detail_interactive_forms.pdf]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/b7/64348655fb46149098d95bdca103d0/frameset.htm]
    Reagrds,
    Priya

  • How to skip non-PDF files in Action on folder?

    Hello,
    I have an Action in Acrobat Pro XI that takes a default folder and (using JS) batch converts the PDFs to text.  However, it also tries to convert *.txt files.  I don't care that it imports the *.txt to *.pdf as temp file but it then stops the batch processing by asking if I want to save the changes to the temporary PDF.  How can I bypass this?  Here is the JavaScript it executes:
        /* Convert PDF to Text File (*.txt) */
        var inPath = "../";
        var outPath = "/c/users/***/desktop/test/output/";
        var myFile = inPath + this.documentFileName
        var myFileExt = myFile.replace(/^.*\./,'');
        if (myFileExt == 'tmp'){
            console.println(this.path);
        } else {
            console.println('Found a PDF!');
            console.println(this.path);
            this.saveAs(outPath + this.documentFileName + ".txt", "com.adobe.acrobat.plain-text");
    Options I'm fine with:
    Skipping all non-PDF files from the Actions WizardCan't find a method to do this.
    Disabling the Save As prompt for the temporary created PDFs (*.txt files)
    The line returned by console.println(this.path) if myFileExt == 'tmp' is this":/C/Users/**/AppData/Local/Temp/A9R6966.tmp
    It still creates a temporary PDF.
    I tried this.closeDoc('true') but it closes Acrobat entirely.
    I hope that is concise enough!  Thanks for looking.

    Skipping all non-PDF files from the Actions Wizard
    This used to be possible, but unfortunately it's not possible any longer in Acrobat XI.
    What you can try to do is just add a Save command to your Action and hope that it saves the temp files silently (maybe you can save them in some temp folder), and then closes them and continues...

  • Sending PO as PDF attachment to Vendor

    Hi Gurus
      I have requirement where, when PO is saved , a PDF attachment should be sent to Vendor email.  Your help is appreciated.
    Regards,
    Gajanan

    Hi,
    Goto NACE .
    u2022 Select EF and click on OUTPUT TYPES.
    u2022 Then select Output Type NEU and click on processing routines .
    u2022 In that you have to add a new entry - medium 5 .
    u2022 Then you need to assign a program, form routine and form.
    u2022 You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
    u2022 Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
    u2022 For subject of the mail goto Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
    u2022 Under General data -> Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE .
    u2022 Now the subject will be PO No. 1800004202.
    u2022 You need to maintain your email id in tcode SU01 and also the vendor's email id.
    u2022 Now while creating a new purchase order , change the medium to External Send .
    u2022 Then goto Communication Method and select CS01 . ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
    u2022 Goto tcode ME9F .
    u2022 Execute.
    u2022 Select the checkbox and click on Output Message.
    u2022 You will get a message MAII 00000000000123 generated.
    also check,
    go to MN04
    here give the condition as NEU
    choose key combination as Purchasing Output Determination: Document Type
    select doc type and partner function as VN vendor mediuam as 5 external send
    select communication here strategy give as CS01
    For subject of the mail go to Mail Title and Texts. In title give PO No. &EKKO-EBELN&
    Also if you want to convert PO in PDF format :
    Get spool request in SP01
    Then go to SE38. Program name: RSTXPDF4 Execute.
    Give the spool number & execute.
    PDF will be created for PO.
    Utsav

Maybe you are looking for

  • Not possible to open PDF file generated by Report functionality

    Hello, we are facing the problem that reports in PDF format deliverd in SharePoint by Duet Enterprise cannot be opened by Adobe Reader. The error we get is the following: Adobe Reader could not open "filename.pdf" because it is either not a supported

  • Maximum resolution on external monitor

    wondering if anyone knows what the maximum resolution the graphics card on my emac (1.42 Ghz model) would support for an external monitor? I am currently running a 17" monitor at 1280 x 1024 using the screen spanning doctor hack and it works well, bu

  • HT1390 movie download is taking forever 10 hours

    Itune movie rental take a long time to download 10 + hours

  • BAPI_RE_CN_CHANGE renewal term deletion

    Hi experts, Please help.. I need help in deleting the renewal item in a real estate contract.  Just need to know what parameters need to be passed and changed to delete the renewal line item in transaction RECN.  I have tried bdc but the screens in t

  • Trouble deploying application in Tomcat!

    When I try to open the deployed application in the TomCat webserver, it throws a HTTP 404 error! However, the same application is working fine in NetBeans, which has a bundled TomCat server! Where am I going wrong? The applications that come with Tom