Problems while downloading pdf attachments

hi
I am using JavaMail 1.4.4 and trying to implement mail client. Everything is working fine but I am unable to download pdf attachments savefile method of mimebodypart* skips some bytes while saving attachments._
for example
like if I am downloading a attachment using web browser it sizes as 38Kb but if I am downloading same attachment using java code then it sizes as 37.3Kb it skips some bytes.....
may be I am guessing wrong but generally it skips when attachment password protected but sometimes same code works for password protected attachments...
appreciate any help...
Thanks in advance.....
Edited by: 909080 on Jan 19, 2012 7:00 AM

Did you post the same problem on stackoverflow.com? See my comments there.

Similar Messages

  • Japanese character problem while downloading file to application server

    Hello All,
    We are facing a strange problem while downloading a file to application server when file contains japanese text.
    We are downloading vendor and customer information in a flat file format on application server. When the login language is EN program show ouput in a properly formatted manner.
    When the login language is JA (japanese) program does download file with customer vendor data. I can see the description is japanese language but the formatting is gone for a toss.
    We are facing similar issue with other programs downloading files on the application server.
    I am using OPEN DATASET........ENCODING DEFAULT. and working on unicode enabaled ECC 6.0 system
    Quick help appriciated.
    Thanks!

    Hi
    Sometimes this also happens because of your desktop setting.Make sure that your OS also supports the JAPANESSE language.
    Ask your technical support team to enable them in your desktop.
    Thanks & Regards
    Jyo

  • Facing a Problem while downloading the data from ALV Grid to Excel Sheet

    Hi Friends,
    Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
       I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
    Can any one help me out in this case.

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

  • Problem while downloading  OS X Lion

    I have an annoying problem while downloading the OS X Lion at about 60-70 % of the download its says that my internet dropped out try again, i've try this many time and still the same problem at 60-70% of the download. What can i do any suggestion?
    thanks

    Do you have the Install Mac OS Lion.app in your /Applications folder?
    If so double-click to install.
    If you no longer have the download then go to MAS > Purchases tab, hold option and download again.

  • Problem with downloading PDFs

    I have just downloaded a new version of Adobe Reader X 10.1.2 but can't download PDFs such as my electricity bill and t.v. licence

    Thanks for your help.  I’ve now sorted it via help from the site where I was trying to download the PDF from.  The following action solved the problem:
    ·        Click on 'Tools' then 'Internet Option'
    ·        Click 'Advanced'
    ·        Scroll down to Security
    ·        Uncheck 'Do Not Save Encrypted Pages to Disk'
    ·        Click 'Apply'
    ·        Click 'OK'
    Re: problem with downloading PDFs
    created by MichaelKazlow <http://forums.adobe.com/people/MichaelKazlow>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4228358#4228358

  • Can't download PDF attachments from Hotmail

    Hi,
    For the past 3 - 4 weeks, I have been unable to download PDFs attached to Hotmail messages.  The Windows forum has been unable to help.
    I'm running Windows 7, IE 9 and using Acrobat X standard.
    So far I have cleared my cache and reinstalled silverlight as the Windows guys suggested.  I also restored my computer to a point in the past when I could download attachments.
    I can download PDFs from web sites, and open existing documents.  I cannot download PDF attachments from other email accounts (such as my academic account).
    Any thoughts?

    If there is an option to download in binary mode, be sure that is selected. I do not have HotMail and have no clue what options might be available.

  • Facing problem while downloading ALV grid Output into Excel

    Hi Guys,
    I am facing problem while downloading ALV grid Output into Excel.
    It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
    If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
    Can someone help me regarding this
    thanks for your help

    Hi,
    Open up Excel on your desktop. Goto Tools > Macro > Security.
    Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
    Was this your problem? Don't forget those points, either.
    check with this wetther it is solved or not.
    Regards,
    sana.

  • Problem while downloading a ALV report to excel

    Hi experts,
    I have an ALV report which took long time to extract records from various table. So while there is some restriction the report can be executed well in foreground. And the report can be extracted well to excel sheet. But while there is hudge records, i have to execute the report in backgroung. And then from spool i generally prefers to download the report to excel.
    There is a field UOM where it contains value ' " ' for some records. And also there may be possiblity that other fields can also contain the same.
    Now my problem is: while download to excel... When ever there is a value ' " ' from this point to the next value ' " '. It is treating as one record. and keep that in a same position in the excel sheet.
    But i want to keep all the values in there respective fields. Can you please how can i do that? Please give me some solution...
    regards,
    charles.

    If anybody have any solution please send me....

  • Problem while downloading the alv output to excel file.

    Hii,
    While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
    Cant put in txt file  as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
    So what are the other ways to do so.
    Edited by: mansi_v27 on Mar 24, 2010 12:35 PM

    Hi,
    Welcome to SCN!!!.
    Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
    Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
    Thanks,
    Vinod.

  • Problem while downloading ALV GRID Output to Local Spreadsheet(Excel) File.

    Hi,
    I am displaying output in ALV GRID. While downloading the output to Excel file using "Local File" option provided by ALV.
    But while downloading the columns and their respective values are coming in single column vertially of excel file instead of horizontal.
    e.g. Grid output is as follows.
    F1 F2
    V1 V2
    (F represents Field Title, and V represent Value)
    Downloaded Excel File content:-
    F1
    F2
    V1
    V2
    Please help.

    Hi ,
    Please use below FM :
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = 'C:\Documents and Settings\akshayr2403\Desktop\docs\rep.xls'
    FILETYPE = 'WK1'
    WRITE_FIELD_SEPARATOR = 'X'
    tables
    data_tab = it_vbak
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Also, if your problem still persist, please refer SAP's demo code on ALV "BCALV_FULLSCREEN_DEMO".
    There are many sample codes available, what you need to do is just go to SE38 and put BCALV* and do F4.
    I hope this will help you.
    Regards,
    Rahul Mahajan

  • Problem while downloading Chinese chatracters into an excel file

    Hi All ,
      While downloading Chinese characters into an excel file , using GUI_DOWNLOAD function module , im getting JUNK Characters instead of chinese characters.
      But if im downloading the same chinese data into an text file or unix file , there is no such problem.
    Thanks in advance and points will be rewarded for helpful answer.
    Regards,
    K.S.R

    Hi, I have the same problem. Anyone has solution now?
    Wu Hao
    2008/08/21

  • HT1338 Problem while downloading the update for the Macbook 10.8.2

    Dear Mr/Mrs
    This Abdelhameed Ata
    I just bought A MACBOOK PRO, and I'm facing this problem that I can not shut down or restart the device because of this following reason.
    The device it forze while downloading the software, I mean i can use the laptop but the downloading has stopped or forze . so please help me what am I suppose to do?

    Perform a Permissions Repair using Disc Utility...
    Verify or Repair Disk Permissions
    Then Restart your Mac.
    Next...
    Go here  >  http://support.apple.com/kb/DL1581 and Download and Install the Combo Update.
    After a Successful Install be sure to Restart your computer.

  • Cache Problem while loading PDF in IE

    Hi,
    I am getting a problem when I load a PDF from my servlet.
    I am using the following code.
    pdfInputStream = httpURLConnection.getInputStream();
    output = aResponse.getOutputStream();
    aResponse.setContentType("application/pdf");
    byte[] buffer = new byte[1024];
    int bytesRead = 0;
    while((bytesRead = pdfInputStream.read(buffer, 0, buffer.length)) >0) {
    output.write(buffer, 0, bytesRead);
    It works fine in Netscape. In IE it gives a problem when the PDF is very small 5KB and less. It does not show the report. When I click reload it shows it then.
    When I make the browser cache setting to "Every visit to page". It works fine.
    Then I tried to disable the cache for IE using the following code but this does not work in IE.
    pdfInputStream = httpURLConnection.getInputStream();
    output = aResponse.getOutputStream();
    aResponse.setContentType("application/pdf");
    aResponse.setHeader("Cache-Control", "no-cache"); //or
    aResponse.setHeader("Pragma", "no-cache"); //or
    aResponse.setDateHeader("Expires", 0);
    byte[] buffer = new byte[1024];
    int bytesRead = 0;
    while((bytesRead = pdfInputStream.read(buffer, 0, buffer.length)) >0) {
    output.write(buffer, 0, bytesRead);
    Each of the above methods did not work. IE was not recognising it as pdf any more and showing the save file box.
    Anybody have any solutions for this. There was another query of this kind but no answers for that.
    Regards,
    Ritesh

    This is not a cache problem.
    With IE you must specify the PDF content length you sent to browser.
    So:
    You must add aResponse.setContentLength(bytesTotal); where bytesTotal is the length of data sent to browser.

  • Bootcamp problem while downloading software

    Hello,
    I'm trying to install Windows 7 via bootcamp assistant, but I've always the same problem.
    While downloading the newest software and drivers for my mac book air (this is the first step of all), the download aborts with the message
    "The software can not be installed because it is not available on the software update server."
    Well, I tried it about 20 times or more, today, yesterday, ..!
    Anybody has an idea?
    Best regards,
    Florian

    Sometimes, Boot Camp Assistant doesn't work with the process of downloading the Boot Camp drivers.
    As you say you have got a Late 2010 MacBook Air, these are the drivers you need, so download them from the Apple site > http://support.apple.com/kb/DL1630
    Follow Apple's steps to install Windows > http://manuals.info.apple.com/MANUALS/1000/MA1559/en_US/Boot_Camp_Install-Setup_ Late2010.pdf

  • Problems with downloading PDF copies of Statements

    Is anyone experiencing problems downloading PDF copies of billing statements? When I attempt to do so, every file I download is categorized by Adobe Acrobat as an invalid file/format. Thanks.

    Are you using the newer My Verizon web site? I know it allows you to download the bills in multiple formats.
    If you have not been switched yet, and you do switch, it will not allow you to switch back to the older MyVerizon format. I am not sure if everyone has switched over.
    http://www22.verizon.com/foryourhome/myaccount/ngen/upr/nlogin.aspx
    If you login and select Bill & Payment from the left side bar, the page should display the current bill.
    At the top of that page you will see a pull down menu that will allow the display of other months.
    To the right of the pull down, there is an icon that says "Get My Bill (Up to 24 months)" click on that icon, and it will start with the Current Bill.
    You can ask for paper bill select PDF or select other formats, click on Download My Bill, then it will say "Your PDF file of your bill is ready for download. " you musk click a second time. For the download to come up in the menu.
    This works for me, and I am only using the Latest Reader and not the Pro Version, But have Pro at work and have had no issues.
    It seems like a more complicated procedure as compared to the previous one, but it does provide multiple download formats, with more options that others have requested.

Maybe you are looking for