Controlling Acrobat functionality through servlet download.

Hi,
I'm pushing a PDF through the ServletOutputStream so that it is displayed at the PC. The code (after I've got a ByteArrayInputStream with the PDF) is as follows:
response.setContentType("application/pdf");
response.setContentLength(bais.available());
response.setHeader("Content-Disposition", "inline; filename=" + strFileName);
ServletOutputStream out = response.getOutputStream();
int fLength = bais.available();
for(int i=0;i<fLength;i++)
out.print((char)bais.read());
out.flush();
out.close();
This causes the PDF to be opened inline within the browser. I'd like to open it automatically within a seperate Acrobat window however.
Using:
response.setHeader("Content-Disposition", "attachment; filename=" + strFileName);
doesn't help either - that just displays the open/save dialog.
Any ideas on how I could do this? Other web sites I'vefaccessed open acrobat instead of displaying the content inline - any ideas???

Why don't you open a new window and use the same logic in that page.

Similar Messages

  • How to control partner function through security objects ??

    Hi, theres any way to control witch Partner function are avalilable to assign in support messages ??
    Theres any security object to control that ??
    I have configured rules for automatic determintation, but in certains cases i need to assign manually.
    I need to control this asignation Partner function
    Any ideas ?? CRM_ORD_OP ??
    Best Regards

    I got it fixed my self.
    here is the solution.
    in user exit :EXIT_SAPMM06E_012.
    call below FM: MM_CALL_UPDATE_PARTNERS
    Trick is pass the partner values the one you wanted to below table: x_mmpa and xuekpa.
    you can calculate partner records from wyt3 table depends on your logic/requirement.
    CALL FUNCTION 'MM_CALL_UPDATE_PARTNERS'
         EXPORTING
           ebeln       = wa_ebeln
           bstyp       = 'F'
    *     knuma       = wa_knuma
           application = 'P'
         TABLES
           x_mmpa      = it_mmpa1
           y_mmpa      = it_mmpa2
           xuekpa      = it_uekpa1
           yuekpa      = it_uekpa2
           i_mmpa      = it_mmpa3
           u_mmpa      = it_mmpa4
           d_mmpa      = it_mmpa5.
    Thanks,
    Mahesh

  • Error 100 when trying to download trial Adobe Acrobat XI through Cloud.

    Tried to download free trial of Adobe Acrobat XI through Creative Cloud. Obviously I was connected to the network but I got an "Error communicating with Adobe.com (Error 100). Check your network connection and restart Adobe Download Assistant." Tried this but never could download.

    See the following help document:
    Troubleshoot Adobe Download Assistant  :
    http://helpx.adobe.com/creative-suite/kb/troubleshoot-download-assistant.html#main_Solutio n_2

  • Free download for acrobat pro fails when it is half way through the download

    free 30 day trial download for acrobat pro fails half way through, help

    Try downloading the installer from https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html
    Phone support is limited to Mon-Fri daytime; outside this you can use chat via Contact Customer Care.

  • While downloading GOA through standard download functionality .

    Hello firends,
    While downloading GOA through standard download functionality .I need to add one extra column to excel sheet in standard download functionality.
    Please give some inputs.Any standard functionality avilable.I mean any BADI or exit.
    Thanks in advance.
    BR,
    Anil

    hi.
    Try using BBP_PD_DOWNLOAD method: APPEND_DOWNLOAD_DATA to append your own data.
    Cheers, Renga
    **Award points for helpfull answers**

  • Passing value from javascript function to servlet

    Hello everybody,
    i need to pass parameter from javascript function to servlet.
    what i wrote is :
    function callPopulateServlet(t)
    var h =document.NewRequest.services;
    var y = t.selectedIndex;
    alert(h.options[y].value);
    var id=h.options[y].value;
    <%session.setAttribute("id",id);%> // am getting error at this point
    document.NewRequest.submit();
    with this id am quering values from database through servlet.
    any body knows plz help me.
    thanks,
    anil.

    this is the error am getting
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I think you're asking 2 different questions.
    The PID control toolset is for using PID loops for control; it's just software.
    The DAQ card and scxi chassis are hardware. If you have the appropriate signal conditioning cards in your chassis to control/monitor your solenoid valve, then you can run a PID loop.
    I believe the simple answer is: the PID control toolset is the best way to do control, but there are simple PID VI's (even on this website) that you can download and use for simple control.
    Mark

  • Problem in opening .ics and .vcs file types through servlet in IE browser.

    I'm having problem in downloading an .ics and .vcs file through servlet in I.E browser. It is happening fine in Mozilla firefox(they both are getting opened in OutLook), but in IE it says as undefined file type.
    I'm using Content Type as : 'text/Calendar' and then setting header as :
    response().setContentType("text/Calendar");
    response().setContentLength(file.length());
    response().setHeader("Content-Disposition", "attachment;
    filename="+filepath);
    and after that i'm writing it to OutPut stream.
    Plz Help.

    Hi,
    On page load check whether the session values are there. If not redirect the user to the login page.
    Hope this helps,
    Regards,
    Sammani

  • What is control form function module.

    hi
    what is control form function module.

    Hi Chaitanya,
    The function module CONTROL_FORM can  be used to pass the control
    commands to FORM THROUGH ABAP/4 PROGRAM.
    <b>Function Call</b>
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING COMMAND = ?...
    EXCEPTIONS UNOPENED =
    UNSTARTED =
    <b>Export parameters:</b>
    COMMAND
    Enter the SAPscript statement you want to execute in ITF format, but without the statement paragraph attribute '/:'.
    <b>Exceptions:</b>
    UNOPENED
    The current form function could not be executed, since the form output was no yet initialized using OPEN_FORM.
    UNSTARTED
    No form was opened yet.
    Possible reasons:
    >The form processing was started using OPEN_FORM without specifying a form name, but no form was opened yet using START_FORM.
    >The last used form was closed using END_FORM, but no new form was opened using START_FORM.
    >The last filled page of the current form has no subsequent page. In this case, the system automatically terminates form printing after this page. You need no explicit END_FORM call.
    >In the current form, no page contains a main window, but a text element shall be output in the main window.
    Regards,
    Rajesh K Soman
    <b>Please rewared points if found helpful.</b>

  • Acrobat won't begin downloading

    I've recently subscribed to Adobe Acrobat XI, but the program will not begin the download process. Is there a way to restart?

    Hello,
    Can you please provide more information here? Have you purchased Acorbat subscription through Creative Cloud or Acrobat.com? To download from Creative Cloud, you need to install Desktop app-Creative Cloud Help | Creative Cloud for desktop
    But before we proceed, we need more information would be helpful.
    Regards,
    Deepak

  • I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.  I've been unable to locate an app that will do this.

    I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
    I've been unable to locate an app that will do this.  The Photos app that comes with the phone or iPad has extremely limited duration controls.  PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
    iPhoto for iPad is getting some terrible recent reviews.  I tried a couple other free apps but they don't use Airplay.
    I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV.  I've thought the iPad or iPhone would be a lower profile controller.
    Am I out of luck?

    Thanks for your help.  Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV.  I guess I'm just stuck with using iPhoto on my MB Air.  Thanks again.
    paul

  • I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. Will I still be charged?

    I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. I have rebooted Itunes and resumed the download of the movie only to receive the same error code. Has the movie file been corrupted? Can I recover the rental even though the time has elapsed? Will I be charged?

    Did you figure this out?  I haven't rented a movie in this new iTunes yet and saw one tonight I wanted to rent.  Same fricken thing is happening to me.  I hate this new iTunes, and I really hate that there are problems like this....why the heck do they have to fix something that isn't broken and break it?  This just really stinks.

  • Not able to retrieve data from database through servlet

    Hi friends,
    I am trying to open a excel sheet through servlet. In this servlet i am retriving data from mssql database.I am not getting any error but no data is retrived
    i m also pasting the code here
    // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3)
    // Source File Name:   EmployeeData.java
    import java.io.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    public class EmployeeData extends HttpServlet
        public EmployeeData()
        public void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
            throws ServletException, IOException
            httpservletresponse.setContentType("text/html");
            httpservletresponse.setHeader("Content-Type", "application/excel");
            httpservletresponse.setHeader("Content-Disposition", "filename=reports.xls");
            PrintWriter printwriter = httpservletresponse.getWriter();
            try
                javax.servlet.http.HttpSession httpsession = httpservletrequest.getSession(true);
                int i = 0;
             /*   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:3413;DatabaseName=newreportsodbc", "reportuser", "cisco");*/
                String url="jdbc:odbc:newreportsodbc";
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
                Connection connection = DriverManager.getConnection("jdbc:odbc:newreportsodbc","reportuser","cisco");
                Statement statement = connection.createStatement();
                printwriter.println("<b><center><u> Search Results </u></center></b>");
                printwriter.print("<table><tr><th color=brown background-color=#fff000>  No.  </th>");
                printwriter.print("<th> DateTime      </th></tr></table>");
           ResultSet resultset = statement.executeQuery("SELECT * FROM t_Call_Type_Half_Hour");
                boolean flag;
                for(flag = false; resultset.next(); flag = true)
                    i++;
                    SerialNo = resultset.getString(2);
                    printwriter.print((new StringBuilder()).append("<table><tr><td> ").append(i).append("</td>").toString());
                    printwriter.print((new StringBuilder()).append("<td> ").append(SerialNo).append("</td></tr></table>").toString());
                if(!flag)
                    printwriter.println("<h1> No records selected </h1>");
            catch(Exception exception)
                System.out.println((new StringBuilder()).append("SQLException: ").append(exception).toString());
        static String empid1;
        static String empid;
        static String SerialNo;
        static String designation;
    }thanks in advance. i just feel there is something to be done with connection string.

    post the table format in SQL

  • Qosmio X300 - Remote control and function bar for windows seven

    Hi,
    I have bought this PC with Vista x64. I have upgraded it to windows 7 (x64)
    But I didn??t find driver for remote control and function bar. The drivers for Vista *64 don't work.
    Help me plz.
    Thanks for reading
    (Sry for my bad English)

    Hi
    The Win 7 drivers are not available for this unit at this time.
    But I found some Win 7 drivers on the Toshiba US driver page.
    Of course you will not find exactly the same X300 series but you can choose the drives released for Qosmio X305-xxxx
    There is no big difference between X300 and X305 so the Win 7 drivers should work too

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

Maybe you are looking for

  • SSMA for My SQL v6.0 not connecting to MS SQL 2008R2

    Is SSMA for My SQL v6.0 not supporting SQL 2008 R2. Is this version not backward compatible. As while connecting to 2008R2 SQL i am getting the below message. "You cannot connect to an older version (SQL Server 2008) of target SQL Server from a highe

  • Help! Where can I find all list of all ACTIONS.

    Hi! I am looking though sample/example programs. Saw some codes that called action by the name. That's great. I came across some other "actions" but I did not see in "http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/DefaultEditorKit.html". Ve

  • Creating custom icons

    I've created a series of custom icons for Acrobat files and burned them to a CD. When a PC user uses the CD the custom icons don't show up. Any ideas?

  • Odd .app_poller_lastrun exception

    I'm getting an odd error. The pretext is my application makes a webservice call. This call executes a .exe. It looks like an error occurs when the .exe finishes. It typically runs 2 - 5 seconds. The WL console has: <Jul 13, 2006 4:45:43 PM EDT> <Erro

  • Max Dashboards&Reports

    Hi Gurus, Any one please give me the answers to the following Questions........... 1)How many Maximum Dashboards can we create? 2)how many Maximum Pages can we create in a single dashboard? 3)What is the Maximum no'of Reports or Sections can we put i