Returning PDF document

Hi all, I have been stuck on this problem for long. Please advice
I have a servlet that returns a PDF document via streaming. I want the client to open the PDF within the browser using the embedded Adobe PDF Reader rather than having a dialog promoting for download. I am using firefox on Windows.
I have my servlet to do the following:
set mime type to application/pdf
add content-disposition header with value "inline; filename=file.pdf"
(no I didn't add a length, because it may not be available)
then starts streaming the data
any suggestions are welcome.
thanks

kittycat_MORAWL wrote:
I have my servlet to do the following:
set mime type to application/pdf
add content-disposition header with value "inline; filename=file.pdf"
(no I didn't add a length, because it may not be available)
then starts streaming the data The content length is in some cases important though. I've seen cases in MSIE that it keeps loading forever or that the target application complained that the file was corrupted. For the remnant it looks fine. But finally you're also dependent on the client configuration. The client may for example have configured its webbrowser to force to open PDF files in an external application instead of inline.
What exactly is the problem you're struggling with by the way? Didn't the file open inline as expected or so?

Similar Messages

  • In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    The application auto-saves your input when you close the document.  If you left the document, as you state, the notes/comments should have been saved and should have been visible the next time you opened the document with the Mobile Reader (note that if you are opening the document with another app such as Apple's built in PDF Viewer, things like notes/comments may not be visible).  Also note that if you are doing an Open In... from another app (like Dropbox), the version of the document in Dropbox does not update; only the version of the document in the Mobile Reader is updated.
    Would it be possible to send a video of the problem you are encountering to [email protected] so that we can try to help?

  • Submit Email returns filled in PDF document

    I has created a fill in form for my website with Adobe Acrobat Professional 8.0, Forms Function which take me to LiveCycle Designer to create the form. When I insert the SUBMIT EMAIL button the guide says I can get either the data back or a filed in form as an attachment. The default condition seems to be just getting the data back as an XML file.
    What I want to get back is the filled in form as an attachment. Each response is "one-of-a-kind" and I don't need to manage the data, merge the data, or consolidate the data. I just need to view the completed form and be able to print it off.
    How do I change the default setting in SUBMIT EMAIL from data to filled in form attachment?

    Thank you for your quick, and helpful response.
    I modified my form per your suggestions, sent it to Europe and they were
    able to submit it without an error message!
    Of course, I received duplicate responses, but at least it worked error
    free.  Thank you.
    Has anyone ever located the root of the Adobe/Lotus Notes problem to
    completely eliminate the duplicate address?
    Lori Kassuba <[email protected]>
    04/23/2009 09:35 AM
    Please respond to
    [email protected]
    To
    Kevin Lucas <[email protected]>
    cc
    Subject
    Submit Email returns filled in PDF document
    This problem has come up in other forum and it's believed to be a bug in
    Lotus Notes. One workaround was to put a space next to the comma after the
    address.

  • CreateWordHiLite returns null on Arabic pdf document

    Greatly appreciated if someone in this forum can help to resolve the issue that I am facing. I am using Visual C# to do some stuff with a pdf document where I want to create a list of all words in a page. I am using InterOp Services to access the api exposed the the acrobat.tlb library. Here is the code snippet I am using:
                CAcroPDPage page = (CAcroPDPage)document.AcquirePage(pageNumber);
                CAcroHiliteList hitelite = new Acrobat.AcroHiliteListClass();
                hitelite.Add(0, 32767);     // create a hilite that includes all possible text on the page
                CAcroPDTextSelect selectedText = (Acrobat.CAcroPDTextSelect)page.CreateWordHilite(hitelite);
    On the last line the CreateWordHilite is returning null, meaning the method failed on an Arabic pdf file. If I run the same code on an English document, the code works fine.
    Regards.

    Hi there,
    Thanks for the response. I narrowed down the problem further. In fact a few of the pages are giving trouble. Now I'm concentrating on the pages that are giving me the word collection but I'm facing a separate issue.
    The CAcroPDTextSelect object is now having values but when I am using the GetText(iNum) method and examining the content of a particular word, it does not show the Arabic word. For example one of the word looks like this: "çáçñý: " . Do I have to use a different sdk for non-latin character sets?
    Regards.

  • Returning to Safari opening pdf documents instead of a third party apps

    Does someone know how to return to the original settings where safari opens the pdf documents, beacuse adbobe webviewer is blocking this feature, and I'd realy like the old days where safari opened them, also I can;t seem to uninstall the adobe plugin?
    Can someone help?

    You're welcome. Glad to help.
    Mahalo for the and Aloha from Big Island.

  • How do I scan multiple pages into one pdf document on a HP Envy 4501 Printer

    My HP Envy 4501 Printer won't let me scan multiple pages into one pdf document.
    I went to "Advanced Settings", clicked on "file" and made sure that the check box next to "Create a separate file for each scanner page" was unchecked.
    When I clicked the Save button it showed the page that I scanned and showed 1/1.  On the right side it had options for changing the brightness and Contrast, Rotate and Crop and "Back", "Save" and "Done" buttons, but nothing about scanning another page.
    Not to mention HP's Customer Support is useless!
    I'd appreciate any help I can get with this problem.
    Thanks,
    Mark

    Hi BH,
    I see your diagram.  I just scanned something.  The screen that I'm looking at right now shows the preview page and the scroll box to the left of that just like in your diagram.  The screen does not show the + button nor does it show the red x button under the scroll box as in your diagram.  I can't see the plus sign because it is not there.
    I tried re-installing the software and drivers as you suggested but that did not have any affect.
    Thank you for trying to help me with this problem but it hasn't worked, therefore I can't mark the reply "Accept as Solution".
    I've noticed that on HP's support forum web page there is only 1 solved request for assistance.  That doesn't give me much confidence in HP.
    Please reply back to this post to let me know if there is anything else that I can try or if you know someone else at HP that can help.
    If I don't here back from you, I'm returning this HP Envy 4501 Printer to get my money back to use it to buy a printer from one of HP's competitors.
    Thanks,
    Mark  

  • How can I print commentaries made to a pdf-document with Adobe reader ?

    My message and question is contained in the header of this message.
    I am receiving occasionally  PDF- documents as an attachement  to an email for examination. I can attach comments to special parts of the document, which are indicated by tags in the document and in a list at the side of that document.
    I may return the document with my remarks to the sender.
    The Problem is: When he wants to print out the document, he will print the tags, but not the content of my comments.
    Is there a way to print the comments also or the list of may comments?
    Thank for your help.
    ko-tri

    Hi,
    Welcome to Adobe forums.
    Please see : http://helpx.adobe.com/acrobat/kb/print-comments-acrobat-reader.html
    I hope this will help you.
    Please let me know, if you need any more help on this.
    ~ Aditya

  • How to generate a PDF document from ABAP program

    Hi experts,
    I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT.
    A pdf document is successfully created, but unable to open it because of some error. I guess some encryption is missing.
    As an alternative I have created a smartform and generated its OTF data in my program and created a PDF. This is working fine.
    But as per my requirement, i cannot go for a smart form.
    Any help to resolve this issue will be highly appreciated.
    Thanks & regards,
    Asrar Ahamed MA
    Infosys Tech. Ltd. INDIA

    Hi Asrar ,
    create a report with this Copy and give your program name in the selection screen whose output need to be in PDF.
    *report  zanusha_spool_to_pdf.
    ---TABLES----
    tables:
      tsp01.
    ---STRUCTURES---
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i,
      mi_rqident       like tsp01-rqident.
    ---INTERNAL TABLES---
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    ---SELECTION SCREEN---
    parameters:
      p_repid like sy-repid, " Report to execute
      p_linsz like sy-linsz default 132, " Line size
      p_paart like sy-paart default 'X_65_132'.  " Paper Format
    start-of-selection.
      concatenate 'c:\'
                  p_repid
                  '.pdf'
        into mc_filename.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      mstr_print_parms-linsz = p_linsz.
      mstr_print_parms-paart = p_paart.
    *-- Make sure that a printer destination has been set up.
    *-- If this is not done the PDF function module ABENDS
      if mstr_print_parms-pdest = space.
        mstr_print_parms-pdest = 'LOCL'.
      endif.
    *-- Setup the Print Parmaters
      call function 'GET_PRINT_PARAMETERS'
        exporting
         authority              = space
          copies                 = '1'
         cover_page             = space
         data_set               = space
         department             = space
         destination            = space
          expiration             = '1'
         immediately            = space
         in_archive_parameters  = space
         in_parameters          = space
         layout                 = space
         mode                   = space
          new_list_id            = 'X'
          no_dialog              = 'X'
          user                   = sy-uname
        importing
          out_parameters         = mstr_print_parms
          valid                  = mc_valid
        exceptions
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          others                 = 4.
      submit (p_repid) to sap-spool without spool dynpro
                       spool parameters mstr_print_parms
                       via selection-screen
                       and return.
    *-- Find out the spool number
      perform get_spool_number using sy-repid
                 sy-uname
        changing mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = mi_rqident
          no_dialog                = space
          dst_device               = mstr_print_parms-pdest
        importing
          pdf_bytecount            = mi_bytecount
        tables
          pdf                      = mtab_pdf
        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   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          others                   = 12.
    *-- Download the file
      call function 'DOWNLOAD'
        exporting
          bin_filesize = mi_bytecount
          filename     = mc_filename
          filetype     = 'BIN'
        importing
          act_filename = mc_filename
        tables
          data_tab     = mtab_pdf.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    form get_spool_number using f_repid
         f_uname
                    changing f_rqident.
      data:
        lc_rq2name like tsp01-rq2name.
      concatenate f_repid+0(9)
                  f_uname+0(3)
        into lc_rq2name.
      select * from tsp01 where  rq2name = lc_rq2name
      order by rqcretime descending.
        f_rqident = tsp01-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear f_rqident.
      endif.
    endform." get_spool_number
    Thanx
    Anusha.

  • How to add a image at the top of every pages of a pdf document

    Hi all,
    My problem is as follows. I have a .pdf document and I'm copying it to another and then I'm appending some new things to it. Now while adding new pdf contents I want an image to be added for every new pages added to the document. I tried using "document.getPageNumber()" here document is a Document object which is a part of "itext-1.3.1.jar". But "document.getPageNumber()" is returning 0 every time.
    If anyone has the solution please help me out.
    Regards,
    turja

    there is no cursor to be set, as you go adding
    something in the pdf document those get added to that
    document and if one page gets filled it adds new page
    to it.If it says "current" page, then this implies that something is current with regards to something else. I'd like to know what "something else" is.

  • How to display a PDF document in popup window

    Hi,
    I have a requirement where i need to display a PDF document to be obtained from a virtual repository and then display it on a popup window.
    Thanks
    DS
    PS: any code snippet or link explaining the above will be helpful

    Use should the ShowProperty servlet in a link or javascript, e.g.:
    <a href="/mywebapp/ShowProperty/path/to/pdf/node
    target="someOtherWindow">pdf</a>
    pdf
    Or, with dyamic node retrieveal (from search or contentSelector,
    assuming node is the pdf Node):
    <a href="/mywebapp/ShowProperty<cm:getProperty node='<%=node%>'
       name='cm_path' conversionType='url'/>
    target="someOtherWindow">pdf</a>
    <a href="javascript:window.open(
       '/mywebapp/ShowProperty<cm:getProperty node=<%=node%">"
    name="cm_path" conversionType="url"/>',
    'SomeOtherWindow',
    'height=400,width=400,scrollbars=auto,resizeable=yes');return false;">
    pdf</a>
    Greg
    Sanjay Datta wrote:
    Hi,
    I have a requirement where i need to display a PDF document to be obtained from a virtual repository and then display it on a popup window.
    Thanks
    DS
    PS: any code snippet or link explaining the above will be helpful

  • Converting Base64Binary to PDF document in BSP

    Hello SDN users,
    I am trying to get and display a pdf document from a webservice which is provided as a base64binary.
    The interface of the webservice tells me that the response type (the actual pdf document) is an xsd:base64Binary.
    The webservice proxy class generates an RAWSTRING for the pdf document as the response from the webservice call.
    So my first guess was to use following class method to convert the base64binary to a normal string
       CALL METHOD cl_http_utility=>if_http_utility~decode_base64
          EXPORTING
            encoded = lv_out_char " RAWSTRING from webservice
          RECEIVING
            decoded = lv_out_char_decoded.
    My second guess was to create an xstring from this converted string via
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
          EXPORTING
            text   = lv_out_char_decoded"
            mimetype = 'APPLICATION/PDF'
          IMPORTING
            buffer = lv_out_charx.
    My next assumption was to create otf-data via function module so that I can send the otf data to the http server cache.
    lv_pdf_len = XSTRLEN( lv_out_charx ).
    call function 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = lv_pdf_len
          bin_file              = lv_out_charx
        TABLES
          OTF                   = LT_OUTPUT_DATA-OTFDATA
          LINES                 = LT_LINES
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          others                = 5.
    My Problem is, that I get back error code 4 which means bad otf.
    Does anyone has a hint how I need to convert the base64binary from the webservice to a right format?
    That would be great!

    Hello Durairaj,
    thank you very much for your answer,
    is it usual that the method
    CALL METHOD cl_http_utility=>if_http_utility~decode_base64
          EXPORTING
            encoded = lv_out_char " RAWSTRING from webservice
          RECEIVING
            decoded = lv_out_char_decoded.
    returns a string containg something like %pdf...? This was not the case with my method call.
    But on friday I found out why. the string I received from the webservice was actually an XSTRING which I found out during a debugging session. The method return parameter was declared  as RAWSTRING so I assumed that I had to convert from Base64 to STRING and then to XSTRING. When I aborted all the converting routines
    if_http_utility~decode_base64
    and
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    and passed the XSTRING to the ICM server cache I received the pdf I wanted.
    But anyway If you could confirm my second question how a a decoded Base64 attribute should look  like I would be very happy.
    Regards,
    Sebastian

  • Creation of PDF Document  using ADF Table data in new window

    Hi Guys,
    I have a requirement of creating a pdf document from adf table and it must open in a new window.I know creation of pdf document using itext pdf jar.But in my case how to write the table data to pdf and how to open it in new window.
    Thanks,
    Srinivas.

    In the TF do like this..
    view activity A-------dialog:invokePdf------->view activity B (invokePdf)
    Fragment A command button would be
    <af:commandButton action="#{pageFlowScope.PdfBean.openPDF}"
    text="Generate" id="cbpdf"
    useWindow="true"
    windowWidth="700" windowHeight="700"/>
    in the action add a return like return "dialog:invokePdf";
    Control flow outcome is "dialog:invokePdf". B would be just a empty fragment.

  • Printer will no longer print PDF document--"no pages selected" although specific pages were selected?

    Brother printer will no longer print PDF document--"no pages selected" although I did specify pages.  Have reviewed and tried Adobe trouble shooting, not helpful.  Cannot print page as image.  Brother says to contact Adobe

    There may be some security issues related to the USPS PDFs.
    http://www.certified-mail-envelopes.com/signatures-usps-certified-mail-return-receipt-requested
    I can't help with the scan/print problem. You seem to have done everything I would try.
    I don't know if maybe using a registry cleaner would help.
    John Hoffman
    Conway, NH
    1D Mark IV, Rebel T5i, Pixma PRO-100, MX472

  • Insert image in pdf Document

    Hi,
    I've a model and this model, I show in pdf. I Know insert rows and columns and pdf document (PdfPtable, PdfPCell...),but I don't know insert a image in the pdf document. How can I do it?
    Thanks

    hi guillermo,
    than put your image in the dest-->images folder and use the following coding:
    public static String getImageUrl(IPortalComponentRequest request, String imageName) {
      StringBuffer buffer = new StringBuffer(1024);
      HttpServletRequest httpRequest = request.getServletRequest();
      String protocoll = (httpRequest.isSecure())? "https" : "http";
      buffer.append(protocoll)
        .append("://")
        .append(httpRequest.getServerName())
        .append(httpRequest.getServerPort())
        .append(request.getWebResourcePath())
        .append("/images/")
        .append(imageName);
      return buffer.toString();
    regards, jens

  • Sending a PDF document with email from ITS.

    Hi all,
    I'm working on the following scenario:
    I've a sapscript form which is being converted to PDF and then being dispatched to logged in user's email id. All this is happening in a report.
    Now, when I call this report from ITS, the email with PDF is not sent.
    I'm using following chain to do this task.
    1. Call a RFC function (FM1) module from ITS.
    2. Call another function module (FM2) from this function module starting a new task.
    3. From this second function module, I submit my aforesaid report with this code.
    SUBMIT ZV_SCRP_DOWN_PDF
      WITH s_vbeln   =  contract
      WITH p_parvw   =  p_parvw
      with user      =  user
      and return.
    4. Commit work in first function module(FM1).
    The problem is that this chain does not run when I call it from my ITS application whereas the same chain runs smoothly from sap, i.e I call the first function module and the email with pdf is sent to my email id. What am I missing here. Pl. help.
    Thanks in advance.
    Vishwas.

    Hello,
    The parameters that can be used in the URL when opening a PDF document are
    described in the document :
    Open Parameters for PDF
    http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
    Regards

Maybe you are looking for

  • How to solve 'java/lang/OutOfMemoryError' when apply weblogic patch 10.3.6.0.10?

    Hi All:  Our platform is IBM AIX power system 64 bit, os level 6.  Oracle Fusion Middleware version is 10.3.6.0.8.  We tried to patch 10.3.6.0.10 on it, but encounter ‘out of memory error’ when  applied WebLogic patch 10.3.6.0.10 on UAT report server

  • Start Yosemite in recovery mode

    In preveous versions of OS X you could access recovery mode (partition) by pressing alt-key during startup. Now in the latest os this partition is not present (at least on my mac). Why is that, and how do I go about to create it?

  • Listtoarray with no value between delimiter

    Reading lines in a text file, Listing a text file , with value between ; sometime , there is no data between 2 ; which I need to know. In that case, (when there is no value between the delimiter) my array have a different length (smaller) Then the da

  • How to install jDeveloper 11g (final) on a Mac??

    I cannot for-the-life-of-me fathom how to install jDeveloper on a Mac. Which version am I supposed to download? How do I install? I tried downloading the zipped file, but seems it only contains PC-files (.exe files and so on). (I should mention that

  • Sum at the top of ALV

    hi ive calculated the sum of a field in ALV on a webdynpro page but the sum is appearing at the top of the ALV is there a way so that it appears at the bottom of the ALV?