Problem opening attached pdf file

Hi everybody,
I'm trying to open a pdf file attached in a mail, but when i try to open it adobe acrobat gives me this error.
Adobe Reader could not open <doc1.pdf> because it is either not a supported file type or the file has been damaged (for eg:it was sent as an email attachment and wasn't correctly decoded.)
I've read many posts related to this problem but i haven't found the solution yet.
Can anyone help me?
Thanx!!

Hi Dieter,
Here is the code,
doc_chng-obj_name = 'Nomina'.
doc_chng-obj_descr = 'Nomina de empleado'.
objtxt = '<html><body>Reserve price : <b>$250000</b>'.
APPEND objtxt.
objtxt = 'A reproduction of the painting to be auctioned'.
APPEND objtxt.
objtxt = 'is enclosed as an attachment.</body></html>'.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
Creating the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num   = 0.
objpack-body_start = 1.
objpack-body_num   = tab_lines.
objpack-doc_type   = 'PDF'.
APPEND objpack.
Crecion de attachments
(Assume the data in OBJBIN are given in PDF format)
DESCRIBE TABLE data_tab LINES tab_lines.
objhead = 'nomina.pdf'. APPEND objhead.
Creating the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num   = 1.
objpack-body_start = 1.
objpack-body_num   = tab_lines.
objpack-doc_type   = 'PDF'.
objpack-obj_name   = 'ATTACHMENT'.
objpack-obj_descr = 'Nomina Empleado'.
objpack-doc_size   = tab_lines * 255.
APPEND objpack.
Entering names in the distribution list
reclist-receiver = 'kkkkkkkkk'.
reclist-rec_type = 'U'.
append reclist.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
  EXPORTING
    document_data              = doc_chng
    put_in_outbox              = 'X'
    commit_work                = 'X'
  TABLES
    packing_list               = objpack
    object_header              = objhead
    contents_bin               = objbin
    contents_txt               = objtxt
    receivers                  = reclist
  EXCEPTIONS
    too_many_receivers         = 1
    document_not_sent          = 2
    operation_no_authorization = 4
    OTHERS                     = 99.

Similar Messages

  • Problem reading attached PDF files

    <!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if !mso]>
    <object
         classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
    </object>
    <style>
    st1\:*{behavior:url(#ieooui) }
    </style>
    <![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    Hello.
    At my work, we use JavaMail (version 1.4.1) in server
    programs, processing mails with attached files from customers. Mostly it is
    TIFF images, but it can also be PDF
    files, and the attached files are extracted and saved for further processing.
    Sometimes, we have a problem, reading attached PDF
    files. The files get saved, but is of size 0 bytes. If I forward it, however,
    using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
    I have tried to forward it using JavaMail, but I cannot
    compose the mail parts, that fails, however - of the same reasons: I cannot
    read the them in:-)
    It looks like it's when the mail is send from a Mac.
    Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
    type is "APPLICATION/OCTET-STREAM"
    The way, I read the part, is to check if the part is an
    instance of an InputStream, and then saving into a byte array, like this:
    h5. Object
    obj = part.getContent();
    if (obj instanceof
    InputStream) {
    InputStream
    inStream = part.getInputStream();
    byte[]
    buffer = new byte[BUFFER_SIZE];
    int
    bytesRead;
    BufferedOutputStream
    outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
    while
    ((bytesRead = inStream.read(buffer)) != -1)
    outBufStream.write(buffer,
    0, bytesRead);
    inStream.close();
    h5. outBufStream.close();
    Problem
    is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
    so a file of 0 bytes are created.
    Interesting is perhaps, that debugging shows me that the
    part instance of the InputStream actually is a
    com.sun.mail.util.BASE64DecoderStream when it fails, and a
    com.sun.mail.util.QPDecoderStream
    when it works OK.
    So I have this idea, that I's a certain type of decoder
    stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
    we use java 1.6 we use the JAF framework from that one, I guess?
    Hope you guys can help?
    Thanks in advance, Per Jensen
    [email protected]

    We have two (MS Exchange) servers (from trace log):
    Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
    Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
    - the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
    But I've found out a couple of interesting things:
    1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
    2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
    <START OF DUMPED FILE>
    This message is in MIME format. Since your mail reader does not understand
    this format, some or all of this message may not be legible.
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: text/plain;
         charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    (The body text here)
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="first_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="first_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
    ...(and so on)
    DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
    MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="second_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="second_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    ...(and so on)
    <END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
    As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
    PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
    (...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
    MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4--
    A10 OK FETCH fuldført.
    A11 FETCH 1 (BODY[TEXT]<40336.16384>)
    * 1 FETCH (BODY[TEXT]<40336> {0}
    20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    A11 OK FETCH fuldført.

  • I'm having problems opening my pdf files. I'm running windows XP and have adobe reader XI (11.0.06)

    I'm having problems opening my pdf files. I'm running wiondows Xp and have adobe reader XI(11.0.06) installed.

    What kind of problems? What happens when you try? Any error messages?

  • Having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas

    having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas

    Hi George ,
    Is it happening with all the PDF' or any specific one?
    Could you please share the error message so that we can replicate at our end ?
    Try repairing reader  once and see if that fixes the issue.
    Launch Reader>Navigate to Help>Repair Adobe Reader Installation
    Regards
    Sukrit Dhingra

  • After loading Mavericks, I can't see/open attached pdf files

    after loading OS X Mavericks on my MacBook Pro, I can't see/open attached pdf files. I've checked my Security Preferences in Safari and Enable Java Script and Allow Plug-Ins are both selected. Any ideas as to what I need to do???

    I checked as you noted above - this is what comes up
    Adobe Acrobat NPAPI Plug-in, Version 10.1.7
    so I assume (?) that it is installed. 
    I just went into my hydro bill and tried to open the pdf version and, low and behold, it opened.  So somewhere in between when I reinstalled it yesterday (after your suggestion) and just now, it is working!!!
    So thank-you for your help!!.  Cheers.

  • Problems opening & printing pdf files created on a Mac

    I am at my wit's end! I recently upgraded to a new version of Acrobat and suddenly a lot of my clients could no longer open my pdf files. I uninstalled the latest version of Acrobat and reinstalled an older version (Acrobat 8.1.3). Some clients started being able to open my pdf files but others could not. So I started using the Acrobat Share server and sending links. Some of my clients cannot open those either and many cannot print even if they can open the files that way. I personally also cannot print from the Acrobat Share server. The pdf files print out with all the surrounding graphics and application design elements. I also can't open the pdf files that I created on my Mac using my PC laptop running Vista. I have tried opening and printing both pdf files and the Acrobat Share links from my Mac and my PC laptop running Vista, to no avail.
    I was under the impression that compatibility problems between Macs and PCs were largely a thing of the past. I was also under the impression that the whole point of exchanging pdf files was that pdf files are cross-platform compatible. Not only am I am losing tons of valuable time, I may be losing credibility with my clients (especially since I have an IT background). I desperately need to know what version of Acrobat I should be running on my Mac so that when I scan documents into my Mac, the pdf files that are created are completely 100% compatible with both Mac and PC operating systems regardless of what operating system and what version of Acrobat my clients are running. I also need to be sure that those same pdf files I create on my Mac can be seemlessly printed out from either a Mac or PC regardless of the operating system or Acrobat Reader version. If anyone can help me get to the bottom of this, I will be eternally grateful. Thanks.

    This file downloaded and works fine for me in Preview on both OS X 10.5.7 and 10.4.11 (and opens in Acrobat Pro 9.1.1 and 8.1.5, and the latest version of Reader on both versions of the OS). As expected.
    If you're printing from Acrobat.com by right clicking in the image area and selecting Print, don't. This isn't printing the PDF, it's printing the Flash frame that contains, as you've noticed, buttons and other elements. (Adobe's Mac Flash plugin is notoriously buggy.) Direct your clients to download the file by selecting the download button, not by right clicking and printing.
    Again, your PDF file is fine.

  • Problem opening all PDF files

    I am suddenly unable to open any PDF file. I get the message that adobe reader has been forced to close. What could cause this. I have repaired the application and have also looked for updates. Says there are none.

    What is your operating system & version?
    Can you open Adobe Reader by itself?

  • I have problem opening a PDF file in my GP process

    Hi,
         I am using an interactive form/file approval callable object in my process. I created a callable object of type interactive form(IF) outside the process(this will start the process). I mapped the interactive form contents.... I download the form, fill it and submit. When I run my task, I see only the two buttons(document accepted and document rejected). I don't see the PDF (attachment).
    From the forums, I realized that there is a bug in Adobe Acrobat Professional version 7.0 in viewing the PDF. So I downloaded Acrobat Prof (TRY) 8.0. With this version, I was able to see PDF in the action along with the two buttons I mentioned. But I am unable to open this PDF to see the data(to review my data).
    Can somebody suggest what I should do. Is there anything I am missing here.
    I did not see any examples where this type of CO is used/implemented.
    Thanks in advance
    Sandy P

    Hi,
           I got it working.
    Sandy

  • Problem opening some PDF files in Adobe Acrobat

    I have several PDF files that cannot be open in Adobe Acrobat.  I have the message as shown below:
    There was an error opening this document. The file is damaged and could not be repaired.
    But I first discovered the problem in Adobe Reader: the files cannot be open in neither Adobe Reader 9, X nor XI, in Win7 64-bit as well as Windows Server 2008 R2.  The original post in Adobe Reader forum is in this link: http://forums.adobe.com/message/6163936
    BUT the files are NOT damaged because I can open them with another software called XChange PDF Viewer.
    Where can I file a bug to Adobe so they can fix the bug?
    Thanks in advance.

    The Acrobat Family complies with the ISO standard for parsing PDF files, and it will reject files that contain unrecoverable errors. Third-party applications may decide to ignore the errors or display the corrupted content anyway, but that's their decision.

  • Unknown error in opening attached pdf files

    Vista operating system; Adobe Reader is selected to use to open pdf files but is not used within Thunderbird. If saved to desktop, files open normally.

    How to instruct Thunderbird to use Adobe Reader to open .pdf files.
    Right click on the attachment and choose 'open'
    a new window opens
    choose 'Open with' and select 'Adobe Reader' from the drop down list.
    select to 'Do this automatically for files like this from now on'
    click on OK
    This will now show up here:
    Tools > Options > Attachments > Incoming tab
    or
    3bar menu icon > Options > Options > Attachments > Incoming tab
    under content Type it will show 'adobe acrobat document (.pdf)
    and to the right it should show the 'Action' to use adobe reader.
    If you want Thunderbird to always ask where to save files, you can select this option or choose where to save files to and use Browse button to locate a folder.
    click on OK

  • Can't Open attached PDF file saved from my Outlook mail.

    I have this problem:
    I'm using Acrobat Reader 9.1 and I've never had this probblem .Cane you halp me?

    If you are not able to get Adobe Acrobat Reader to open .pdf files in the browser. Even after you check in prefs to show pdf files in the browser.
    Make this modification for all versions of Adobe Acrobat Reader that show under this key.
    -Note: Deleting the key and all subkeys for any older versions also seems to fix this problem. So if you see this key present,
    HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\Originals
    delete the 7.0 and all subkeys.
    HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\Originals
    -Right click on Originals and choose NEW DWORD Value and name it bBrowserIntegration, hit enter,
    double click on the new value and make sure the value is 1

  • Problems opening a pdf file from a URL protected by OAM with M.Explorer

    Hello,
    we have protected a web portal with OAM. When we access a URL which is a pdf file with Mozilla Firefox, the file is retrieved and opened correctly, but when we try to open it using Microsoft Explorer it won't open. If we disable OAM the pdf is opened without problems. We set Microsoft Explorer security level to the lowest possible value but the problem persists.
    Can anyone give us a hand to solve this issue?
    Thank you

    Hi Francisco,
    In the AccessGate screen for the WebGate, if you have the CachePragmaHeader and CacheControlHeader set to "no-cache", try setting them to "public" (or blank), restart the web server, and see if that resolves the issue.
    Regards,
    Colin

  • Problem opening a pdf file?

    HI! I have a pdf file, it does open when clicked on it,but quick look of the file shows an error message and same thing happen when i try to send the file as an email attachment, it cannot be opened at the receiving end??

    I get the following message;
    "To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade to the latest version of Adobe Acrobat Reader from www[dot]adobe[dot]com/products/acrobat/readstep2[dot]html
    For further support, go to www[dot]adobe[dot]com/support/products/acrreader[dot]html "
    I have tried to open this address on several computers and a few iPhones and I get the same message every time.

  • Problems opening, inserting PDF files

    I have a user (Windows 7, Acrobat Standard 10.1.8) who is unable to see files when trying to open files from within Acrobat or insert files to an existing PDF document. If they go to the file outside of Acrobat they can open the file. If they open Acrobat first and then go to File > Open no files show up in the window.  Same for inserting files. If they try to insert a PDF into an existing PDF the window shows no files, no matter if PDF files or All Files are selected.
    I uninstalled and reinstalled Acrobat and that corrected the problem for a day.  I have installed all updates so not sure what the problem is.

    Sounds like the OS is doing something. Next time try a repair instead of the reinstall. If the repair does the job, it is a lot faster until you can trace down the problem.
    When it happens, does a reboot make a difference?

  • Problems opening a pdf file after updating

    Why is it when I update from 10.1.4 to 10.1.9 I can no longer openup the same pdf file that I could before? I am using Vista home premium.

    It says that it is opening but it just sets there and does nothing, If I get out and try again it does the same. The onlyway I can fix it is to uninstall it and then reinstall 10.1.4. But when it updates to 10.4.9 the samething happins. While it is 10.1.4 I have no problem,

Maybe you are looking for

  • Osx dual monitor support via rdp

    does os x rdp to windows 7 support dual monitors? I remotely login to windows7 which has dual monitors via rdp. I was wondering if I could get dual monitors for os x and keep the same display as my windows7. Any advice is appreciated

  • BPC 7.5 SP06 open IS SP05 Error Dimension

    Hi, i am working in Client using SP06 the BPC 7.5 NW Client, and working too in Client using 7.5 SP05. I have the Client for NW 7.5 SP06 BPC and I can not open InputShedules the SP05 version, get CurrentView problem in Dimensions. Any idea ? Thank yo

  • How do I retrieve iWeb data...

    I had to re-install the OS from the CD and I've been able to restore all my software but I've lost my web "sites" when I open iWeb. Is there a way I can drag the web folders (which I saved to my iDisk and external drives as backup) into iWeb so I can

  • "Global" color changing

    (Apologies in advance for improper terminology.) Question: Can I select a color in a photo (call it Color A) and then select another color in the photo (Color B) for Color A to globally replace? Scenario:  I do amateur studio photos with single-color

  • Segmentaion fault

    Hi, ZCM 11.3.1 FRU1 Since updating to the above we have discovered that any new image uploaded gives a segmentation fault when trying to copy it to another device. I have tested uploading to the network and via a local usb disk. Just get error 'egmen