Downloading the generatred PDF from the server results in a blank browser

Hi,
We are using iText to generate PDF documents and that's working fine. Only when we try downloading the generated PDF document it just opens up a blank browser and does not display anything. This behavior is noted in IE and Firefox! The application is hosted on IBM Websphere and IBM Web server on a Linux machine, the application is a https (secured) application.
There are no errors logged in the log, just that the PDF does not get downloaded. The size of the PDF files are around 2.5 MB.
When I try to replicate the issue from my local workspace the same PDFs work fine - able to download! Any app ser/web server setting issue? Has anyone faced such an issue, any suggestions?
Thanks

Hello All,
Thank you for initiating to reply. Actually the case is erratic, as I said in my first post, as the document gets downloaded for a few times and does not for a few times. The pattern is whenever the file size if 2.5 MB or more then the doc. does not get downloaded on the client side (browser - IE & firefox). Below is the code (it has the proper content type, content disposition), please have a look at this and suggest
     String fileName = pdfName+".pdf";
          File file = new File(outputPdfFolder+ fileName);
          BufferedInputStream input = null;
          BufferedOutputStream output = null;
          try {
          response.setContentType("application/pdf");
response.setHeader("Content-Length",""+file.length());
response.setHeader("Content-Disposition", "inline;filename=\""+outputPdfFolder+fileName+"\"");
// Open streams.
     input = new BufferedInputStream(new FileInputStream(outputPdfFolder+fileName), (int)file.length());
output = new BufferedOutputStream(response.getOutputStream(), (int)file.length());
logger.logInfo(this,"File length size:"+file.length());
long fileLength = file.length();
byte[] buffer;
if(fileLength < Integer.MAX_VALUE) // this constant value holds the MAXIMUM POSSIBLE VALUE of integer data type
buffer = new byte[(int)fileLength];
input.read(buffer);
output.write(buffer);
else
          buffer = new byte[1000];
          int c;
     while ((c=input.read(buffer, 0, 1000)) != -1)
     output.write(buffer, 0, c);
          }

Similar Messages

  • How to download pdf from application server

    hi all,
    anybody has code to download pdf from application server to presentation server.
    right now i get the pdf file on to the desktop but i get error on opening.
    gui_download gives error if i use xstring.
    pl advice.
    thanks.
    sap fan.

    Hi,
    use the below code to download file from app server to presentation server
    PARAMETERS: S_file TYPE SAPB-SAPPFAD
    default '\folder1\abc,pdf'.
    PARAMETERS: t_lfile TYPE SAPB-SAPPFAD
    default 'c:\temp\xyx.pdf'.
    START-OF-SELECTION.
      CALL FUNCTION 'ARCHIVFILE_SERVER_TO_CLIENT'
        EXPORTING
          path             = source_file
         TARGETPATH        = target_lfile
    EXCEPTIONS
       ERROR_FILE       = 1
       OTHERS           = 2
      IF sy-subrc eq  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • HT4886 When I go to download the server app am I going to have to pay for it?

    I just purchased 3 MacMini Servers, I am going to make the volumes RAID, with that I need to reinstall, and go out and download the Server App.  Am I going to be required to pay for it, or will it somehow recognise that the computer came with the Server software on it originally?

    If apple knew your Apple ID when you bought the servers, and you registered those computers with the same Apple ID, then it will automatically know that you are entitled to three copies of the Server app.
    However, this often doesn't happen right because they didn't match up the Apple ID on the purchase.  So make sure you have your order number(s) for the three servers and phone Apple's support number for those sales (should be on the order acknowledgement) and they'll fix it for you over the internet.

  • I need to download the server runtime for BEA WEBLOGIC server

    Hi ^^,
    I am trying to create a web project in Eclipse WTP europa. I do not have the bea weblogic server installed on my desktop. My organization has issues running it locally. I need to first create a project and then create a war and then deploy it on server.
    I am going through the tutorial at the following website:
    http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html
    It says "To do this tutorial you will need a server runtime that is supported by WTP"
    Also "During web application development, we will need a server runtime environment to test, debug and run our project".
    Hence I need the link where I can download the server runtime for bea weblogic server.
    T&R,
    Prashant

    Crossposted over all places:
    [http://forums.sun.com/thread.jspa?threadID=5347690]
    [http://forums.sun.com/thread.jspa?threadID=5348001]
    [http://forums.sun.com/thread.jspa?threadID=5348002]
    Don't crosspost. It's very rude.

  • Link to download the server 2008 r2 enterprise without service pack

    Hi,
    Please provide the link to download the server 2008 r2 enterprise without service pack
    Thank You!!

    Hi,
    Please check the below download links:
    Windows Server 2008 R2 Enterprise Edition x64 (Full Install) VHD
    http://www.microsoft.com/en-us/download/details.aspx?id=2227
    Windows Server 2008 R2 Enterprise Edition x64 (Core Install) VHD
    http://www.microsoft.com/en-in/download/details.aspx?id=18348
    Windows Server 2008 R2 Evaluation (180 days)
    http://www.microsoft.com/en-in/download/details.aspx?id=11093
    And we could refer to the download center for more information:
    download Center
    http://www.microsoft.com/en-us/download/default.aspx
    Hope this may help
    Best regards
    Michael
    If you have any feedback on our support, please click
    here.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Downloading a pdf from facebook or email gets a blank document

    Downloading a pdf from facebook or email gets a blank document

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How can I download books as PDFs from Google Books ?

    I used to be able to download books as PDFs from Google Books (Full View) until about 12 months ago. However, now when I click the PDF link, I get a dialog box that says "You have selected a PDF file (12 Kb), and it offers me options for download or opening. It's the Nitro PDF tool. If I do download a file it's always 12 Kb and it's not a valid PDF file. Most of the books, I'm looking at should be over 10 Mb, and all previously downloaded books were over 5 Mb.
    I'm using Windows XP and Firefox 3.5.19, and PDF Download from NitroPDF.
    Is there an add-on that will give me back the ability to download files ?
    or is there a conflict with something else that is preventing PDF Download from working ?
    I can't see anything on NitroPDF's site about the add-on.

    Uninstall/Disable NitroPDF.
    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working when you try to download a PDF file using Firefox Safe Mode.

  • After update to ios 7.0.2, duplicate emails downloading to iphone 4 from Verizon server

    After Update to ios7.0.2, duplicate emails downloading to iphone 4 from Verizon server.

    After reading other posts about icloud, checked phone setting. Had icloud off, but phone duplicated Verizon mail account under Accounts in iphonesettings , possibly resulting in duplicate downloads from same account.

  • Client GWI - not able to download a gwi profile from crm server

    hey there,
    I´m faced with an issue about client based GW Integration and with the gwi profile download.
    The thing is, I´ve two separate crm systems. Last week i´ve implemented it with my notebook for the first system and it works fine - i mean the gwi profile download.
    but this week, i tried to implement it on the second system. i cannot use my notebook, but I´m armed with a workstation.
    so I did the same things as I did last week (notes, settings and so on). I used the official gwi pdf files to do so.
    But I´m not able to download the gwi profile from the second system/server. (either SAP_DEFAULT nor my z-profile)
    do you have any ideas? that would be great!
    if you need more information, i will provide it here.
    thanks in advance!
    /*************EDIT
    Solved the issue!
    There was a Link problem...I had to change the Link manually, which is used after you klick on "Edit Sync Options" under personalization.
    END***************/
    Edited by: Marcus Findeisen on Aug 16, 2011 3:21 PM

    hey danny,
    greyed out problem:
    go to spro and profile definition. scroll horizontal in order to change display mode from show to edit
    link problem:
    we had problems with the connection over, i dont know, services or other systems between end user computer and sap maschine. we couldn´t use the original sap server link. we had to use another one. so I enhanced the component to integrate this speciall linkn.
    hope i could help u.

  • Download  350MB of data from Application Server to Presentation server

    i want to Download  350MB(Around 2.5Million record of Table BSEG) of data from Application Server to Presentation server..
    i have tried with the transaction CG3Y and program using open dataset,read dataset,close dataset,ws_download...but went in vain,,,ended with TIMEOUT ERROR..will OPEN DATASET 'path' FOR OUTPUT FILTER 'Compress'  be helpful
    ..please help me ..its urgent..

    you can do the FTP with Unix commands..
    initially connect to the application server  by using command
    FTP <app server ip>,then it willl ask for username and password... after successful connection you  can use the following commnads to transfer file
    lcd <destination path name>(set the dest path)
    cd <source path>(set the sorce path),
    get <filename to be transfererd>( do the transfer)....
    You can do same with ABAP code also, for this you need to use some function modules like..
    FTP_CONNECT ( to establish the connection)
    FTP_COMMAND ( to execute the commands like cd, lcd get,put)
    finally FTP_DISCONNECT to close the open connection...
    for further details refer standard program RSFTP002,RSFTP003....
       reward points if helpful...

  • Unable to open pdf from mapped server.

    Does anyone know why all of the sudden adobe will not let you open any pdf from a mapped server? it seems to have happened after a update to adobe. I have uninstalled the newest version and tried an older version and I still have the same issue.
    Message reads: There was an error opening this document. The network path was not found.
    I can copy the file to the computer and it will open fine. Seems to be an adobe issue that just took place in the last couple of days.

    What happens when you open the Adobe app, then tell it to open the file?
    How big are the attachments?  There are limitations to the size allowed to be sent:
    Email Provider
    Size Limit
    Gmail
    25Mb
    Outlook
    20Mb
    Yahoo
    25Mb
    Are you sending the files to yourself?  Not sure how you are emailing files from a website...
    Are the PDF's password-protected, or some kind of copyrighted eBook perhaps?  Can you email other files successfully, or are PDF's the only files that don't work?
    Perhaps using a free Cloud service as an intermediary might work better.
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How to download midlet in SDK from tomcat server on localhost

    how to download midlet OVER THE AIR in Java ME SDK 3 from tomcat server running on localhost
    THANKS!

    Hi,
    The most important thing is that you need to ensure that WebLogic is start the Java command with debugging options. This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode".
    If you have JSP's and servlets you have other steps as well. I have included the generic steps for any application server. We have plans to post a 'How to remote debug JSP's deployed on Weblogic' in the near future. Keep posted.
    1. You need to replace WebLogic's JSP engine with OJSP and you need to
    setup debugging parameters for OJSP. This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
    Here are some tips:
    A. You'll probably need to specify the following jars in some WebLogic config file. The jar files are all located in <jdev_install>/lib/
    xmlparserv2.jar
    ojc.jar
    jdev-rt.jar
    ojsp.jar
    ojsputil.jar
    B. Add these jar files to the VM's classpath
    C. The OJSP class name is oracle.jsp.runtimev2.JspServlet. You will need to specify this class where you configure your JSP engine information.
    D. You need to pass the following debug parameters. Again this is set up in the app server configuration file(s):
    debu[i]Long postings are being truncated to ~1 kB at this time.

  • Transparency issue when generating PDF from InDesign Server

    Hi there
    Has anyone experienced any issues with transparency appearing solid white when generating a PDF from the InDesign server? There is no issue when exporting from the InDesign application, only when using the Server.
    Any pointers / suggestions would be much appreciated
    Thanks
    Davey

    Davey, please send me an InDesign Server document that I could use to reproduce this problem. My e-mail address is [email protected] Thank you. --DougR

  • Download a xml file from a server

    Hi guys,
    First of all excuse me for my disorganized english.
    I have a JSP applicaction using tomcat 4.1 wich is accesed from internet using an IIS server for the redirection.
    In my servlet I'm generating a XML file wich will be downloaded by the client, in the servlet I set up this header, like in the others forums some fellows told.
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment;filename=\"" + nombreBorrador + "\"");
    I'm having a problem downloading a file from a server, the download dialog box says in the filename the name of the servlet instead of the name of the XML file.
    Any comments will be really appreciated.
    Best Regards
    JCh.-

    hai,
    give a print of ur variable "nombreBorrador" and check whether the name of xml file is getting passed correctly.
    Ani

  • How-To: Download emails to disk from POP server?

    I need to download "raw" email messages from a pop server so I can process them in an archiver downstream. I want to use JavaMail since I am familiar with Java....would Message.getInputStream() give me the whole message? This is the headers, content, etc? In particular I am trying to hook up to a MS Exchange 2003 box.
    Would this work? What would?
    Thanks,
    Michael

    right...i am trying to preserve the original message from exchange. I think MS using CRLF for line terminators. Is that right?
    basically I am going to reparse the source with JavaMail in another application. I have another script that pulls via webdav from Exchange and it seems to work well...I think that has CRLF's...then I move it to a linux server.
    I will try it and see what happens.
    Thanks!

Maybe you are looking for

  • How do I call a sub vi and have the window appear in a certain location that I specify?

    I have a vi that will be used to control a robot. I am using a sub vi that is a sort of joystick-drag the mouse to move the robot. This pops up as a dialog when the user moves the mouse over a graph, but it appears in the middle of the screen. I want

  • I opened my Macbook pro and now it won't start

    So I started to have issues with my MacBook Pro not recognizing the hard drive. I opened it up and started to see how dirty the inside was so I took the logic board and battery and cleaned them up. When I put eveything back together, now the machine

  • No sound with mirroring

    I successfully mirror my iMac to my Apple TV, but I don't get sound to the Apple TV.  I Opt+click the volume icon on the menu bar, but Apple TV is not an option under output.  When I go to Sound preferences, my Apple TV shows up as an output option,

  • Update Query is Performing Full table Scan of 1 Millions Records

    Hello Everyboby I have one update query , UPDATE tablea SET           task_status = 12           WHERE tablea.link_id >0           AND tablea.task_status <> 0           AND tablea.event_class='eventexception'           AND Exists(SELECT 1 from tablea

  • Relation between products

    Hi all, Does new relation between products add it self into idoc structure after generation?? I want do add to IDoc product with relations my own relations between products. I wanted to compare standard relation "accessories" with my own. But I simpl