PDF attachment appears inline

I've been struggling with this for two days now. So, I need some input. I have followed the JavaMail example for attaching a file, but it appears inline instead, looking like the pasted content below.
I'm doing the typical:
MimeBodyPart mbp2 = new MimeBodyPart();
// attach the file to the message
FileDataSource fds = new FileDataSource(filename);
mbp2.setDataHandler(new DataHandler(fds));
mbp2.setFileName(fds.getName());
// create the Multipart and add its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);
mp.addBodyPart(mbp2);Thanks for any help,
Ron
------=_Part_4_11866827.1252079069030
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Please see attached report. If you experience difficulty in opening the report directly from this e-mail, first save the attachment to your local computer, and then open it from the saved location.
------=_Part_4_11866827.1252079069030
Content-Type: text/plain; name="C:/tmp/pcards/RG1252079068343_approval.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="C:/tmp/pcards/RG1252079068343_approval.pdf"
JVBERi0xLjQKJeLjz9MKMiAwIG9iaiA8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvVHlwZS9YT2JqZWN0
L0xlbmd0aCAxNTM3L0JpdHNQZXJDb21wb25lbnQgOC9IZWlnaHQgNDIvQ29sb3JTcGFjZVsvSW5k
ZXhlZC9EZXZpY2VSR0IgMjU1KP////f39//39/fn5//v7//n5/fe3vfW1u/OzvfOzu/GxvfGxu+9
ve+1te+tre+lpeeUlOeMjN5zc95ra95aWt5SUs5cKVwpzlxiXGLGAADOAADn7+fv9+/3//fW
ve+1te+tre+lpeeUlOeMjN5zc95ra95aWt5SUs5cKVwpzlxiXGLGAADOAADn7+fv9+59YA
WhjO59bG3s6UxqWMvZyEtZRCjFoxe0pjpXtcKYRKGHM5pc61jLWca62EWpxzUpRrAGtcKZzGrTmM
WjGEUlwpe0oAUiGUvaWc1rWUzq2MxqWEvZx7tZRzrYxrpYRjnHtCpWs5nGMhlFIYe0IYjEoQczlc
YmsxAGNcKQBzMXvGnFqle1Kcc0qUa0KMY0qlczmEWkKcazF7Uj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b21wb25lbnQgOD4+L1N1YnR5cGUvSW1hZ2UvV2lk
dG9yIDE1L0NvbG9ycyAxL0JpdHNQZXJDb21wb25lbnQgOD4+dGgg
NjI+PnN0cmVhbQp4nJVW/U8TZxw/dAMlaOZ+WB7AZU6XbGTQ2unmKGZvHqPtULraPmwhe5HB
NjI+1S3e
[clipped]
------=_Part_4_11866827.1252079069030--

Thanks, DrClap. I appreciate the input. I probably just included a bad example of the many variations of the code that I've tried. So, let me paste here the fuller version of the code and the javamail debug output. I've played with those headers in every way I can think of. It still goes inline. Argggh!
public class SendMailWithAttachment
     private String     from;
     private String     to;
     private String     subject;
     private String     text;
     private String     fileName;
     public SendMailWithAttachment(String from, String to, String subject, String text, String fileName)
          this.from = from;
          this.to = to;
          this.subject = subject;
          this.text = text;
          this.fileName = fileName;
     public void send()
          boolean debug = true;
          // create some properties and get the default Session
          Properties props = System.getProperties();
          props.put("mail.smtp.host", "smtp.xxx.com");
          Session session = Session.getInstance(props, null);
          session.setDebug(debug);
          try
               // create a message
               MimeMessage msg = new MimeMessage(session);
               msg.setFrom(new InternetAddress(from));
               msg.addRecipient(RecipientType.TO, new InternetAddress("[email protected]"));
               msg.setSubject(subject);
               // create the text message part
               MimeBodyPart mbp1 = new MimeBodyPart();
               mbp1.setText(text);
               mbp1.setHeader("MIME-Version", "1.0");
               mbp1.setHeader("Content-Type", "text/plain; charset='iso-8859-1'");
               // create the pdf attachment part
               MimeBodyPart mbp2 = new MimeBodyPart();
               FileDataSource fds = new FileDataSource(fileName);
               mbp2.setDataHandler(new DataHandler(fds));
               mbp2.setFileName(fds.getName());
               mbp2.setHeader("MIME-Version", "1.0");
               mbp2.setHeader("Content-Type", "application/pdf");
               mbp2.setHeader("Content-Disposition", "attachment");
               mbp2.setHeader("Content-Transfer-Encoding", "base64");
               // create the Multipart and add its parts to it
               Multipart mp = new MimeMultipart();
               mp.addBodyPart(mbp1);
               mp.addBodyPart(mbp2);
               // add the Multipart to the message
               msg.setContent(mp);
               // add headers for message
               msg.setHeader("MIME-Version", "1.0");
               msg.setHeader("Content-Type", "multipart/mixed");
               msg.setHeader("X-MS-Has-Attach", "yes");
               // set the Date: header
               msg.setSentDate(new Date());
               msg.saveChanges();
               // send the message
               Transport.send(msg);
          } catch (MessagingException mex)
               mex.printStackTrace();
               Exception ex = null;
               if ((ex = mex.getNextException()) != null)
                    ex.printStackTrace();
     }DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 Sender <[email protected]> OK
RCPT TO:<[email protected]>
250 Recipient <[email protected]> OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP: [email protected]
DATA
354 Please start mail input.
------=_Part_8_12598697.1252113081107
MIME-Version: 1.0
Content-Type: text/plain; charset='iso-8859-1'
Content-Transfer-Encoding: 7bit
Please see attached pdf report. If you experience difficulty in opening the report directly from this e-mail, first save the attachment to your local computer, and then open it from the saved location.
------=_Part_8_12598697.1252113081107
MIME-Version: 1.0
Content-Type: application/pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment
JVBERi0xLjQKJeLjz9MKMiAwIG9iaiA8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvVHlwZS9YT2JqZWN0
L0xlbmd0aCAxNTM3L0JpdHNQZXJDb21wb25lbnQgOC9IZWlnaHQgNDIvQ29sb3JTcGFjZVsvSW5k
ZXhlZC9EZXZpY2VSR0IgMjU1KP////f39//39/fn5//v7//n5/fe3vfW1u/OzvfOzu/GxvfGxu+9
ve+1te+tre+lpeeUlOeMjN5zc95ra95aWt5SUs5cKVwpzlxiXGLGAADOAADn7+fv9+/3//fW59YA
WhjO59bG3s6UxqWMvZyEtZRCjFoxe0pjpXtcKYRKGHM5pc61jLWca62EWpxzUpRrAGtcKZzGrTmM
WjGEUlwpe0oAUiGUvaWc1rWUzq2MxqWEvZx7tZRzrYxrpYRjnHtCpWs5nGMhlFIYe0IYjEoQczlc
YmsxAGNcKQBzMXvGnFqle1Kcc0qUa0KMY0qlczmEWkKcazF7UjGMWlwphFJcKZRaIXtKIYxSXGJz
OQBaXCkAazHW595atYQ5lGMhnFoYc0IYhEoQe0IQjErn9+/O3tbG59atzr2lxrWczrWUxq2EtZx7
[clipped]
------=_Part_8_12598697.1252113081107--
250 Mail queued for delivery.
QUIT
221 Closing connection. Good bye.

Similar Messages

  • Receiving PDF attachment as inline text

    Hi -
    I recently set up Mail on my iMac with an IMAP account. It looks like the emails I receive with PDF attachments appear as inline text within the body of the email when I download them from the IMAP server. I am able to log onto the IMAP server via its webmail interface, and download the PDF as a separate attachment that way.
    I am able to receive .zip files as attachments just fine.
    Any advice would be appreciated.
    Thanks,
    Tom

    I don't think that's exactly what is happening with me. It doesn't appear as an inline image, but rather as an inline "octet stream" which looks like it is the computer code that underlies the image. E.g.:
    ------=_NextPart_00101C8173E.31943807
    Content-Type: application/octet-stream;
    name="Payne OGL.pdf"
    Content-Transfer-Encoding: base64
    Content-Description: Payne OGL.pdf
    Content-Disposition: attachment;
    filename="Payne OGL.pdf"
    JVBERi0xLjIKJcjH0MRGCjQgMCBvYmoKPDwKL1R5cGUgL091dGxpbmVzCi9Db3VudCAwCj4+CmVu
    ZG9iago1IDAgb2JqCjw8Ci9UeXBlIC9Gb250Ci9TdWJ0eXBlIC9UeXBlMQovTmFtZSAvRjAKL0Jh
    c2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIC9NYWNSb21hbkVuY29kaW5nCj4+CmVuZG9iago2
    IDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9QYXJlbnQgMyAwIFIKL1Jlc291cmNlcyA4IDAgUgovTWVk
    aWFCb3ggWyAwIDAgOTkwLjcyIDU5OS4wNCBdCi9Db250ZW50cyA3IDAgUgo+PgplbmRvYmoKOSAw
    IG9iago8PAovVHlwZSAvWE9iamVjdAovU3VidHlwZSAvSW1hZ2UKL05hbWUgL0ltMAovV2lkdGgg
    Mjc1MgovSGVpZ2h0IDE2NjQKL0JpdHNQZXJDb21wb25lbnQgMQovQ29sb3JTcGFjZSAvRGV2aWNl
    R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yNjk5NSAwMDAwMCBuIAow
    MDAwMjI3MTA1IDAwMDAwIG4gCjAwMDAxMjEyOTUgMDAwMDAgbiAKMDAwMDIyNjk3MiAwMDAwMCBu
    IAowMDAwMjI3MDg2IDAwMDAwIG4gCnRyYWlsZXIKPDwKL1NpemUgMTgKL1Jvb3QgMSAwIFIKL0lu
    Zm8gMiAwIFIKPj4Kc3RhcnR4cmVmCjIyNzQyNAolJUVPRgo=
    ------=_NextPart_00101C8173E.31943807--

  • How do I prevent single-page PDFs from appearing inline in the email body?

    When someone sends me a multiple page PDF, the email contains an attachment icon.  When I click on the icon, the PDF is opened full-screen.  When I click on the screen, icons appear including a box with an arrow pointing up.  Clicking on this icon, lets me send the PDF to other applications such as iBooks. 
    When someone sends me a single-page PDF, the PDF is displayed inline in the body of the email and I do not see a way to send the PDF to other applications.  Is there a way to view the PDF full-screen and thus send the document to other applications?
    I have the new iPad (v3) running iOS 7. 

    What you are experience is totally normal and the expected behavior for a single page PDF as an attachment in an email. You can easily save it to another app by simply tapping and holding down on the open PDF and the Open In window will pop up. It may take a little practice but it does work. Just tap and hold down on the open PDF.

  • In the mail app why can't I see single page pdf attachment created by SSRS R2 on iPad with iOS 8?

    We have reports that are generated using Sql Server Reporting Services 2008 R2 and are distributed to users by email as a PDF attachment.  This worked fine in iOS 7 but ever since users have updated to iOS 8 the single page PDF is missing even though it has the paper clip icon indicating there is an attachment with the email.  If the PDF is multiple pages then the PDF icon would appear but there seems to be a problem with the single page pdf that is embedded on the mail app in iOS 8.
    We've recreated this issue creating a test report and sent it to iPads that have iOS 7, iOS 8 using different models of iPads (2, 3, 4) and the ones that have iOS 7 work fine.  Only the ones that have iOS 8 have this issue.  Also tried changing the format of the file to a PNG, TIFF and again the same results on the iPads with iOS 7 display it correctly.  Another test we did was send the PDF to our personal email and open it on our home iPads we were not able to see the single page PDF on iOS 8.  Looking at the headers of the email I can see the that the Content-Type is multipart/mixed.  When the original is forwarded to oneself on the iPad the attachment is included but the Content-Type is application/ms-tnef.

    Can you check your email headers, I have also noticed this for reports that are generated using Sql Server Reporting Services 2008 R2. It could to be due to the Content-ID header I believe.
    As a single page attachment on iPad will try and display inline, the Content_ID header is possibly affecting this and showing a small blank square as the image instead. Although this isn't defined as inline within the Content-Disposition header and will appear as an attachment on Outlook.

  • Mail turns PDF attachment into jepg

    I use distiller and acrobat to create PDFs from Quark documents; for the last few days, attaching a new PDF to an email in Mail has turned the PDF into a jpeg which PC users can't open. The problem has just cleared itself (without me knowingly doing anything) but it has happened before and I guess may happen again. Any idea of the cause and solution?

    What I should have said is Apple should not make the Image Size adjustment an available option when a PDF file is attached to a message.
    Yes, this is the answer. Using the term seemed to happen - it either happens or it doesn't but Mail will not and cannot change the file type or the file extension for an attached file without user intervention. Using the Image Size adjustment for a single page PDF file which appears inline or viewed in place within the body of the message does change the file type or file extension for the file from .pdf to .jpg since the Image Size adjustment is intended and can only be used for picture or image file attachments, not with PDF files.

  • PDF attachment does not show in Mail

    When I receive a mail with PDF attachment, I can't see any icon or inline text. Can anyone advice?

    All of my mail accounts either show the icon or the file itself in the Mail App. Try these simple things first.
    Restart the iPad by holding down on the sleep button at the top of the iPad until the red slider appears, then slide to the right to power off the iPad. Turn the iPad on again by pressing the sleep button until the Apple logo appears. Once the iPad has fully rebooted, open Mail to relaunch.
    Try a hard reset by pressing and holding down on the sleep button at the top of the iPad while holding down on the home button at the bottom, until the Apple logo appears and the iPad restarts. Launch Mail again and see what happens.
    Message was edited by: Demo

  • Outlook 2013 will not Quick Print a PDF attachment on a Windows 8.1 computer

    LS,
    One of my customers has a Windows 8.1 Computer, Internet Explorer, Office 2013 and Acrobat reader XI (all updated, latest version, etc.).
    Whenever my customer gets a email in his outlook with a PDF attachment, he cannot use Quick Print in the menu to print the attachment.
    When he does this, simply nothing happens, no error, no nothing and the printer doesn't print. Any other type of attachment appears not to be a problem.
    If I use a different program to open the PDF than with a little work around I can open the PDF and than print it.
    Of course my customer would prefer to use Adobe reader.
    Do you have a solution for this problem??
    Kind regards,
    Clemens Linders

    I read somewhere that disabling hardware rendering in Internet Explorer could help with a problem like I had with this customer. And also I read somewhere that you can disable some protection security in PDF.
    So I did these two things and I thought.... Yes, this is it. I could now print emails that have a PDF attachment.
    Unfortunately, my customer called me yesterday and sys he has still got the same problem when trying to print emails that have multiple PDF attachments.
    I am running out of ideas, does anybody have an idea how to fix this??
    Kind regards,
    Clemens Linders

  • Reading an PDF Attachment  From Sender Mail Adapter

    Hi All,
                   i am able to get a mail  from my Mail Server, But my aim is need to Read an PDF attachment from the mail, in SXMB Moni i am getting the Payload with attachment, I have a created a module to convert that PDF to XML(Module is working fine in file to file sceneraio) .
    In adapter should i need to use Payload Swap Bean Module also , because in sap help said that i need  Select Keep Attachments. I want to know how that how to Push the PDF attachment to My Custom Module which is used to convert the PDF To XML.
    If Payload Swap Bean Module needs to be Used , please tell me the Key Names and Key Values to be used.(swap.keyName,swap.keyValues)
    Thanks and Regards,
    Kamal
    Note: Points will be awarded

    Kamal...
    See if this helps
    [Module Name]
      AF_Modules/PayloadSwapBean
    [Module Parameters]
    The following parameters are used for this module
      swap.keyName          the name of a supported attribute.
      swap.keyValue         the value of a partial string that is required
                            to appear.
    The supported attributes (swap.keyName) include the payload attributes
    such as payload-name, payload-description and any content attributes
    such as content-type, content-disposition, content-description, etc.
    Regards
    Ravi Raman

  • Smartform - PDF attachment through E-mail issue

    Hi,
    A custom form and custom program was created to print the Purchase order information through ME21N, 22n and 23n.
    It also has E-mail option. when output medium 5(Simple mail) and 7(External send), email will be send to respective mail-id's with the PDF attachment.
    I have issue at the time of saving PO which processed with medium 5. when i save A popup appears "Express document update was terminated received from author". Brief message about it is
    "Error Info... 00 671: ABAP/4 processor: COMMIT_IN_POSTING"
    In Smartform driver program i am using below function modules to convert OTF into PDF and send through e-mail.
    Function Module: CONVERT_OTF.
    Function Module: SO_DOCUMENT_SEND_API1.
    I am not sure, what i missed out. Can you guys tell is this the correct way to send PDF attachment through E-mail or i missed out any function module for commit.
    Regards,
    Hemanth.
    Edited by: keerthipati hemanth on Jul 31, 2008 1:15 PM
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jul 31, 2008 3:14 PM

    Hi Hemant,
    Below is the code for the  downloading of the smartform into the PDF Format.
    * Program Name : ZPPREP_SHOPFLOOR_VIEWER_ZOOM
    REPORT zppeerep_shorepfloor_viewer_zoom.
    * T A B L E S    D E C L A R A T I O N
    *---Tables Used.
    TABLES: afpo,
            mara,
            marc,
            aufk,
            afko,
            itcoo,
            nast,                          "Messages
            *nast,                         "Messages
            tnapr,                         "Programs & Forms
            addr_key,
            arc_params,                    "Archive parameters
            toa_dara.                      "Archive parameters
    * I N T E R N A L    T A B L E S     D E C L A R A T I O N
    *--Internal Tables Used.
    * D A T A     D E C L A R A T I O N
    *--Global Variables Used.
    DATA: ws_matnr LIKE afpo-matnr,
          ws_werks LIKE aufk-werks,
          ws_mtart LIKE mara-mtart,
          ws_wrkst LIKE mara-wrkst,
          ws_fname TYPE rs38l_fnam,
          ws_ctrlp TYPE ssfctrlop,
          ws_optns TYPE ssfcompop,
          w_padest LIKE tsp03l-padest.                          "BMC01+
    DATA: da_message_printed(1) TYPE c,
          da_preview_processed(1) TYPE c,
          repeat(1) TYPE c,
          da_subrc LIKE sy-subrc.
    DATA: w_otfdata  TYPE ssfcrescl.
    DATA: BEGIN OF it_itcoo OCCURS 0.
            INCLUDE STRUCTURE itcoo.
    DATA: END OF it_itcoo.
    DATA: w_otf  TYPE itcoo.
    *--Data Declaration for Printing Layout
    DATA: ls_itcpo     TYPE itcpo.
    DATA: lf_repid     TYPE sy-repid.
    DATA: lf_device    TYPE tddevice.
    DATA: cf_retcode   TYPE sy-subrc.
    DATA: ls_recipient TYPE swotobjid.
    DATA: ls_sender    TYPE swotobjid.
    DATA: ls_control_param   TYPE ssfctrlop.
    DATA: ls_composer_param  TYPE ssfcompop.
    DATA: ls_addr_key        LIKE addr_key.
    DATA: w_screen(1) TYPE c.
    DATA: xscreen(1) TYPE c.
    DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
    * C O N S T A N T S
    CONSTANTS: c_fas1(8)  TYPE c VALUE 'PRINTFAS',
               c_fas2(15) TYPE c VALUE 'PRINTFASDRAWING',
               c_wip1(8)  TYPE c VALUE 'PRINTWIP',
               c_wip2(15) TYPE c VALUE 'PRINTWIPDRAWING'.
    * S E L E C T I O N - S C R E E N.
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-bl1.
    * Production order
    PARAMETERS: p_aufnr LIKE afpo-aufnr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK bl1.
    START-OF-SELECTION.
    *--Begin of Commenting                   "
    *--Get Partially processed orders
      MOVE: sy-mandt         TO nast-mandt,
            'V1'             TO nast-kappl,
            p_aufnr          TO nast-objky,
            p_aufnr          TO nast-parnr,
            sy-langu         TO nast-spras,
            sy-datum         TO nast-erdat,
            '1'              TO nast-nacha,
            '3'              TO nast-vsztp,
            'X'              TO nast-manue,
            sy-uname         TO nast-usnam,
            'DFLT'           TO nast-ldest,
            sy-langu         TO nast-tdspras,
            'Shop Floor Papers' TO nast-tdcovtitle,
            '1'              TO nast-tdarmod,
            'BUS2032'        TO nast-objtype.
    *--Printer settings
      CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
        EXPORTING
          pi_nast       = nast
          pi_repid      = sy-repid
        IMPORTING
          pe_returncode = cf_retcode
          pe_itcpo      = ls_itcpo
          pe_device     = lf_device
          pe_recipient  = ls_recipient
          pe_sender     = ls_sender.
      MOVE-CORRESPONDING ls_itcpo TO ls_composer_param.
      ls_control_param-device      = 'PRINTER'.
      ls_control_param-no_dialog   = 'X'.
      ls_control_param-preview     = 'X'.
      ls_control_param-getotf      = ls_itcpo-tdgetotf.
      ls_control_param-langu       = sy-langu.
    *--End   of Commenting                   "
    *--Start of Addition                     "
      CLEAR:   ws_werks.
      SELECT   SINGLE werks
               INTO   ws_werks
               FROM   aufk
               WHERE  aufnr = p_aufnr.
      CLEAR:   ws_matnr.
      SELECT   SINGLE plnbez
               INTO   ws_matnr
               FROM   afko
               WHERE  aufnr = p_aufnr.
      CLEAR:   marc.
      SELECT   SINGLE matgr
               INTO   marc-matgr
               FROM   marc
               WHERE  matnr = ws_matnr
               AND    werks = ws_werks.
    *--End   of Addition                     "
    *  CHECK NOT ws_matnr IS INITIAL.       
      IF NOT ws_matnr IS INITIAL.          
    *--Start of Addition                    
        SELECT   SINGLE matgr
                 INTO   marc-matgr
                 FROM   marc
                 WHERE  matnr = ws_matnr
                 AND    werks = ws_werks.
    *--Start of Addition BY Rapidigm01_01+
      ELSE.
        marc-matgr = c_wip1.
      ENDIF.
    *--End Of Addition BY Rapidigm01_01+
    *--End   of Addition                     "
    END-OF-SELECTION.
      PERFORM call_smartform.
    * F O R M    R O U T I N E S
    *&      Form  call_smartform
    *       text
    FORM call_smartform.
      CLEAR: ws_ctrlp, ws_optns, ws_fname.
    *--Start of Addition                                 "
      TRANSLATE marc-matgr TO UPPER CASE.
      IF marc-matgr = c_fas1 OR
         marc-matgr = c_fas2.
        PERFORM call_paper_a.
      ELSEIF marc-matgr = c_wip1 OR
             marc-matgr = c_wip2.
        PERFORM call_paper_b.
      ENDIF.
    *--End   of Addition                                 "
    ENDFORM.                    "call_smartform
    *&      Form  call_paper_a
    *       text
    FORM call_paper_a.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
    *>>BC SPARTA03    DATE: 19/05/2008
    *      formname           = 'ZPPSF_SHOP_FLOOR_PAPER_A'  "Rapidigm03_01-
          formname           = 'ZPPSF_SHOP_FLOOR_PAPER_C'  "Rapidigm03_01-
    *<<EC SPARTA03    DATE: 19/05/2008
    *       formname  = 'ZPPSF_SHOP_FLOOR_PAPER_A_2893'   "Rapidigm03_01+
        IMPORTING
          fm_name            = ws_fname
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      CHECK NOT ws_fname IS INITIAL.
      CLEAR w_otfdata.
      ls_control_param-getotf = 'X'.
      CALL FUNCTION ws_fname
        EXPORTING
          archive_index      = toa_dara
          archive_parameters = arc_params
          control_parameters = ls_control_param
          mail_recipient     = ls_recipient
          mail_sender        = ls_sender
          output_options     = ls_composer_param
          user_settings      = ' '
          is_nast            = nast
          aufnr              = p_aufnr
          flag_orig          = 'X'
        IMPORTING
          job_output_info    = w_otfdata
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      LOOP AT w_otfdata-otfdata INTO w_otf.
        APPEND w_otf TO it_itcoo.
      ENDLOOP.
      CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
        TABLES
          otf_table = it_itcoo.
    ENDFORM.                    "call_paper_a
    *&      Form  call_paper_b
    *       text
    FORM call_paper_b.
      DATA: ws_doknr TYPE draw-doknr,
            ws_dokvr TYPE draw-dokvr.
      CLEAR: ws_doknr, ws_dokvr.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZPPSF_SHOP_FLOOR_PAPER_B'
        IMPORTING
          fm_name            = ws_fname
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      CHECK NOT ws_fname IS INITIAL.
      CLEAR w_otfdata.
      ls_control_param-getotf = 'X'.
      CALL FUNCTION ws_fname
        EXPORTING
          archive_index      = toa_dara
          archive_parameters = arc_params
          control_parameters = ls_control_param
          mail_recipient     = ls_recipient
          mail_sender        = ls_sender
          output_options     = ls_composer_param
          user_settings      = ' '
          is_nast            = nast
          aufnr              = p_aufnr
          doknr              = ws_doknr
          dokvr              = ws_dokvr
          flag_orig          = 'X'
        IMPORTING
          job_output_info    = w_otfdata
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      LOOP AT w_otfdata-otfdata INTO w_otf.
        APPEND w_otf TO it_itcoo.
      ENDLOOP.
      CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
        TABLES
          otf_table = it_itcoo.
    ENDFORM.                    "call_paper_b

  • Making some Characters in PDF Attachment as bold

    Hi All,
    I have a sapscript output which i am sending as a PDF Attachment.
    Though the required characters in Script are BOLD but they are not appearing as BOLD in PDF Attachment.
    Please guide me on how to make the characters in the PDF Attachment as BOLD.
    I have searched in the forum but could not find any matching solution.
    Thanks & Regards,
    Bhavika

    Please provide me some inputs.
    Regards,
    Bhavika

  • Mail app PDF attachment is not visible

    I found several reports (and workarounds) of PDF attachment hiding in Mail application. It seems to be still not fixed, as I got the issue with current up-to-date software configuration: OS X 10.6.7, Mail 4.5 (1084).
    My details:
    - email is generated by some automatic system, it has HTML body and one PNG image (referred from the HTML). I know there is also PDF attachment (2 pages).
    - In mail view I see HTML rendering and PNG image as the only attachment; attachment count is 1. Nothing about PDF, also PDF contents is definetly not visible "inline".
    - in mail source I can see that the HTML, PNG and PDF are there (as MIME attachments). Quick look to the source does not show anything obviously broken there; I've programmed MIME email sending in low level and have some idea about it.
    - in File-Quick view attachments I can see PDF contents
    - in File-Save attachments also PDF attachment is saved fine
    - in most other emails I can see PDF files, inline or as attachments. So it has something to do with specific mail format, or MIME configuration.
    So the issue is that by normal view I just would have no idea that there is this hidden attachment.
    I happened to know from another mail reader (gmail) that the attachment is there, otherwise I could never notice it. Therefore it is major annoyance, especially that Apple has not succeeded to fix it fully for 5 years or so.

    I'm having the exact same problem here. I'm in Lion 10.73 running Mail 5.2.
    This is very frustrating because the "list view" window, there's an attachement column that show's there's 2 attachments (presumably one image attachment for a signature and one for a pdf)... but in the message window there's no pdf attachment.
    Surprisingly I have an iPad3 and the same message is missing the attachment as well.
    But then I go online to my webhost's webmail access and the attachment is there.

  • Cannot open pdf attachment in my e-mail

    Cannot open pdf attachment in my e-mail                 I can open pdf files on the hard drive
    I am using Windows Internet Explorer 9, Microsoft Vista
    When I receive an e-mail with a pdf attachment a box pops up
    What do you want to do with
    get attachment __ aspx ? file =
    size: 3.11 kb
    from: blu166.mail.live.com
    open
    the file won't be saved automatically
    save
    save as
    cancel
    Your help will be appreciated

    Hi Pat
    Microsoft upgraded Hotmail e-mail accounts to Outlook.com
    The Print Screen key has no function.....when the 2 boxes mentioned above appear on the monitor (which I have detailed) they require action or I cannot proceed to another screen or function.
    Maybe my problem should also be sent to Microsoft Customer Service...your thoughts.
    I note there has been 106 views hard to believe that no one else has had this problem.
    Appreciate your time

  • Can't get a PDF attachment to open without a pop-up box opening.

    Every time I get a PDF attachment in AOL Email I click on it to open and it brings up a dialog box wanting to know what program to use to open. I select Adobe Acrobat Reader and then check the box to do this all the time and click on OK. The PDF opens and I can view it. The very next time the same box appears as to what I want to do. How can I eliminate that annoying box?

    Hello........is anyone there? I have this same problem. Every time i go to open a pdf it asks how. It doesn't matter what i set the tools-options-applications-pdf action to. How do I stop this stupid question?????
    fyi, your site says you don't have to register to ask a question,but then takes you back here where you try to reply and it tells you to register, and round and round we go. No longer a fan of firefox.

  • PDF attachment does not open

    I have a Samsung i760 with Verizon Wireless. I am running Windows Mobile 6 Professional. I have installed Adobe Reader PPC 2.0, and the Reader application itself appears to work fine (appears in my Program list, I can open the program, etc.). I have my work e-mail (from an Exchange server)pushing to my phone, and my e-mail has been working fine. Every day, I receive a report via e-mail with a .pdf document attached. When I open this e-mail, and click on the .pdf attachment, it says "Downloading..." on the bottom of my screen, but the file never finishes downloading or opens up. The file is only "(12K)" according to the e-mail, so it should download fairly quickly, and then Adobe Reader should open up and display the file. Any ideas why this does not happen? It just says "Downloading" forever until I manually stop the download. Thanks.

    Hey there,
    Same I experienced the same problem, hopefully someone can help up...

  • Text of pdf, but no pdf icon appears in email

    I have received an email on my iPad with a pdf attachment. When I open the email, the whole text of the pdf appears in the body of the email, but there is no attachment icon anywhere to allow me to open the pdf and print it or send it to iBooks.  Is there some way to get that pdf icon to show up?

    This is because it is only a single paged document. Press down in the middle of it for a prompt box to open and take it from there!

Maybe you are looking for

  • I have a problem with display of laptop hp 530.

    The monitor itself and the wireless antena are working but the plastic housing on the top and on the front of display at the bottom where the connectors are the plastic is broken so the doesn't stands firm. where I can find the housing so I can repl

  • USB Keyboard Not Working At Login Screen

    After waking my brand new Mac Pro (OS X 10.7.4) from sleep, my usb keyboard sometimes becomes unresponsive. So, at the login, I am unable to type my password in order to restore my session. Is there a reason for usb devices to not work after waking t

  • Itunes recognizing but not windows

    Hey iTunes is not recognizing my ipod but windows is ive already reset someone please help

  • Should iPods be 'run in' ?

    As I am expecting delivery of a 60g video iPod, and being well aware of technical issues with both the new model and older generations, Do members think that a process of 'running in' such as used in new cars, etc where the first operational period i

  • Print Button missing from list

    When I create a new project the Print option is frequently missing from the Toolbar Buttons field in Webhelp Settings. Sometimes I close the dialog, reopen it, and "Print" is miraculously there, so I can select it. Other times I can't make it display