Error in attach PDF file into email
Hi, currently i have problem in sending out email as i try to go through the <b>Offline Interactive PDF Form Using E-Mail</b> and also <b>Uploading and Downloading Files in Web Dynpro Java</b> and then i manage to get the file that i want to upload into the filedownload UI
but then the problem is i cannot map the context of the FILEDOWNLOAD UI data source to the attachment email
which is as below the code
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
messageBodyPart.setDataHandler(new DataHandler(new MemoryDataSource(wdContext.currentContextElement().getPdfSource())));
messageBodyPart.setFileName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
messageBodyPart.setHeader("Content-Type","application/pdf");
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
Transport.send(message);
wonder anyone know where is the problem or mistake or anyone has the idea of doing it
Hi, currently i have problem in sending out email as i try to go through the <b>Offline Interactive PDF Form Using E-Mail</b> and also <b>Uploading and Downloading Files in Web Dynpro Java</b> and then i manage to get the file that i want to upload into the filedownload UI
but then the problem is i cannot map the context of the FILEDOWNLOAD UI data source to the attachment email
which is as below the code
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
messageBodyPart.setDataHandler(new DataHandler(new MemoryDataSource(wdContext.currentContextElement().getPdfSource())));
messageBodyPart.setFileName(wdContext.currentContextElement().getFileUploadUI().getResourceName());
messageBodyPart.setHeader("Content-Type","application/pdf");
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
Transport.send(message);
wonder anyone know where is the problem or mistake or anyone has the idea of doing it
Similar Messages
-
Can no longer attach pdf files into email.
I recently purchased a new computer with Windows 8.1 as the OS. Seems that I am no longer able to attach PDF files into any email. Any clues as to what has gone wrong?
Thanks for the help. Seems I had a failed Windows update several weeks past I had forgottent about. Had to do a restore to the prior date to get back to the right configuration. Did an online session with Mircosoft, reinitiated the update, and it seems as if the issue is resolved. We were able to re-test attaching and send pdf files. Seems there is still some slight issue with IE, but you appear to be on the right track about focusing on Web Outlook if the problem continues to surface. Thanks again.
-
Trying to attach pdf files to emails I'm sending to myself. Instead of attaching the file, it copies the text. I want the file so I can have it on my iPad. I've been able to do this in the past, but not the last two tries. What am I doing wrong? Thanks.
You aren't doing anything wrong.
If the PDF is short enough, your iPad Mail app will display the text as part of the mail.
Actually it is still an attachment.
Tap and HOLD on the text and you should see options to "Open In..." that will allow you to open the PDF in most PDF readers such as iBooks, GoodReader, etc. -
Hi,
I am user iPad and I do not know how can attach a file into email e.g. CV.
ThanksYou attach files within the app that creates the file or within the app that the file is saved. For example you email photos from within the Photos App itself. Typically there will be an action icon within the app - an arrow icon many times - you tap on that to bring other options like Share - then Email.
Attachments must be mailed within the apps themselves. -
In SharePoint 2010, I am trying to copy pdf file programmatically from a non-RMS protected document library into RMS protected library using copyTo() method.
But I am getting an error while doing so. it gives error as mentioned below -
This library does not accept files of the given type. You must either upload a
new, unprotected file that supports rights management or re-upload a document
that was previously downloaded from this library.
Please suggest some solution.
Thanks,Are You sure that you have give 'PDF' in caps in your program? and check whether you are getting all the datas before calling the method.
in my program, i have used like this and it is working fine for me,
I am getting PDF content from the form...
DATA ls_formoutput TYPE fpformoutput.
DATA pdf_content TYPE solix_tab.
DATA lp_pdf_size TYPE so_obj_len.
DATA lv_mail_title TYPE so_obj_des.
*Attach the PDF .
lp_pdf_size = XSTRLEN( ls_formoutput-pdf ).
pdf_content = cl_document_bcs=>xstring_to_solix(
ip_xstring = ls_formoutput-pdf ).
document->add_attachment(
i_attachment_type = 'PDF'
i_att_content_hex = pdf_content
i_attachment_size = lp_pdf_size
i_attachment_subject = lv_mail_title ) . -
Error while sending PDF file by Email
Hi All,
I have a requirement to send multiple files by Email attachement from SAP to internet address.
All files sent correctly, except one PDF file.
I have 2 spools, and I am using FM CONVERT_OTFSPOOLJOB_2_PDF to get PDF data for Spool.
Then I am converting the 134 length PDF data to 255 Email Attachement binary table.
Now I have 2 file F1.PDF and F2.PDF, in SAP Office outbox and in receivers email, F2.PDF opening fine, however for F1.PDF I am getting some error no 109 in Adobe, which says "There was an error processing a page.There was a problem reading this document. (109)".
Please help in figuring out the reason for this.
Additional Information F2.PDF has some text data (SAP Script output) and F1.PDF has some text data with logo (SAP Script Output)
Thanks in advancehi check out following code..
REPORT ZRICH_0003.
DATA: ITCPO LIKE ITCPO,
TAB_LINES LIKE SY-TABIX.
Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
PERFORM SEND_FORM_VIA_EMAIL.
FORM SEND_FORM_VIA_EMAIL *
FORM SEND_FORM_VIA_EMAIL.
CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
Creation of the document to be sent File Name
MAILDATA-OBJ_NAME = 'TEST'.
Mail Subject
MAILDATA-OBJ_DESCR = 'Subject'.
Mail Contents
MAILTXT-LINE = 'Here is your file'.
APPEND MAILTXT.
Prepare Packing List
PERFORM PREPARE_PACKING_LIST.
Set recipient - email address here!!!
MAILREC-RECEIVER = '[email protected]'.
MAILREC-REC_TYPE = 'U'.
APPEND MAILREC.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
PUT_IN_OUTBOX = ' '
TABLES
PACKING_LIST = MAILPACK
OBJECT_HEADER = MAILHEAD
CONTENTS_BIN = MAILBIN
CONTENTS_TXT = MAILTXT
RECEIVERS = MAILREC
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
ENDFORM.
Form PREPARE_PACKING_LIST
FORM PREPARE_PACKING_LIST.
CLEAR: MAILPACK, MAILBIN, MAILHEAD.
REFRESH: MAILPACK, MAILBIN, MAILHEAD.
DESCRIBE TABLE MAILTXT LINES TAB_LINES.
READ TABLE MAILTXT INDEX TAB_LINES.
MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
Creation of the entry for the compressed document
CLEAR MAILPACK-TRANSF_BIN.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 0.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'RAW'.
APPEND MAILPACK.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
PERFORM GET_OTF_CODE.
LOOP AT SOLISTI1.
MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
APPEND MAILBIN.
ENDLOOP.
DESCRIBE TABLE MAILBIN LINES TAB_LINES.
MAILHEAD = 'TEST.OTF'.
APPEND MAILHEAD.
Creation of the entry for the compressed attachment
MAILPACK-TRANSF_BIN = 'X'.
MAILPACK-HEAD_START = 1.
MAILPACK-HEAD_NUM = 1.
MAILPACK-BODY_START = 1.
MAILPACK-BODY_NUM = TAB_LINES.
MAILPACK-DOC_TYPE = 'OTF'.
MAILPACK-OBJ_NAME = 'TEST'.
MAILPACK-OBJ_DESCR = 'Subject'.
MAILPACK-DOC_SIZE = TAB_LINES * 255.
APPEND MAILPACK.
ENDFORM.
Form GET_OTF_CODE
FORM GET_OTF_CODE.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZTEST_FORM'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR SOLISTI1. REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. -
Issue the send attach Pdf file in Email. (Urgent).
Hello folks, i have issue with attach pdf in e-mail using two lib´s: activation.jar and mail.jar. Currently using a platform SOA and am creating the serviceType, then a file don´t is local and yes by message, so far so good.
Already tried in several forums, but without success.
When send the message (pdf file), the program receive a type ContentType (application/octet-stream) and cause the MessageException, below:
MessageException - in Container:
Message: [B@79ffb7f7 /// the service received the pdf file
[09/03/02 12:22:45] ID=dev_ESBTest (info) application/octet-stream *///ContentType of message*
javax.mail.SendFailedException: Sending failed; *///Exception*
nested exception is:
javax.mail.MessagingException: IOException while sending message;
nested exception is:
**javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octet-stream**
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octet-stream
at com.sun.mail.smtp.SMTPTransport.sendMessage (SMTPTransport.java:353)
at javax.mail.Transport.send0 (Transport.java:164)
at javax.mail.Transport.send(Transport.java:81)
With this, it send the e-mail without attach......above my source simple source code.
ServiceType Code:
protected void SendEmail(XQPart prt, String host, String from, String to) {
// create some properties and get the default Session
Properties props = System.getProperties();
props.put("mail.smtp.host";, host);
Session session = Session.getInstance(props, null);
try {
// create a message
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = { new InternetAddress(to) };
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject("Test Subject.");
MimeBodyPart bp1 = new MimeBodyPart();
bp1.setText("Test Text.");
MimeBodyPart bp2 = new MimeBodyPart();
m_xqLog.logInformation(prt.getContentType());
bp2.setContent(prt.getContent(), prt.getContentType());
bp2.setFileName("teste.pdf";);
Multipart mp = new MimeMultipart();
mp.addBodyPart(bp1);
mp.addBodyPart(bp2);
msg.setContent(mp);
msg.setSentDate(new Date());
Transport.send(msg);
System.out.println("Email sent successfully!");
} catch (MessagingException mex) {
mex.printStackTrace();
Exception ex = null;
if ((ex = mex.getNextException()) != null) {
ex.printStackTrace();
}Anybody would can help me, please....
Thanks ....
Paulo Sampei.Hello Folks, me again. Then the solution about this question above, below:
Solution:
Code 1: Call 2 method passing requirement parameter:
Obs: Always ContentType = application/octet-stream
ByteArrayInputStream attachStream = new ByteArrayInputStream((byte[]) prt.getContent());
//call constructor class:InputStreamDataSource
InputStreamDataSource isds = new InputStreamDataSource("Testepdf.pdf", prt.getContentType(),attachStream);
//call method sendMail(InputStreamDataSource,host,from,to)
sendMail(isds, s_Host, s_SendFrom, s_SendTo);Code 2: Class InputStreamDataSource
// statement DataSource
private class InputStreamDataSource implements DataSource {
private String name;
private String contentType;
private ByteArrayOutputStream baos;
InputStreamDataSource(String name, String contentType,
InputStream inputStream) throws IOException {
int read;
this.name = name;
this.contentType = contentType;
baos = new ByteArrayOutputStream();
byte[] buff = new byte[256];
while ((read = inputStream.read(buff)) != -1) {
baos.write(buff, 0, read);
public String getContentType() {
// TODO Auto-generated method stub
return contentType;
public InputStream getInputStream() throws IOException {
// TODO Auto-generated method stub
return new ByteArrayInputStream(baos.toByteArray());
public String getName() {
// TODO Auto-generated method stub
return name;
public OutputStream getOutputStream() throws IOException {
// TODO Auto-generated method stub
throw new IOException("Cannot write to this read-only resource");
}Code 3: mehod sendMail(InputStreamDataSource, host, from, to)
protected void sendMail(InputStreamDataSource attach, String host,
String from, String to) {
// create some properties and get the default Session
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
Session session = Session.getInstance(props, null);
try {
// create a message
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = { new InternetAddress(to) };
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject("Assunto teste.");
// create and fill the first message part
MimeBodyPart bp1 = new MimeBodyPart();
bp1.setText("Texto teste.");
// create the second message part
m_xqLog.logInformation("[ContentType]:[attach] "
+ attach.getContentType());
// attach the file to the message
MimeBodyPart bp2 = new MimeBodyPart();
bp2.setDataHandler(new DataHandler(attach));
bp2.setFileName(attach.getName());
// create the Multipart and add its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(bp1);
mp.addBodyPart(bp2);
// add the Multipart to the message
msg.setContent(mp);
// set the Date: header
msg.setSentDate(new Date());
// send the message
Transport.send(msg);
System.out.println("Email sent successfully!");
} catch (MessagingException mex) {
mex.printStackTrace();
Exception ex = null;
if ((ex = mex.getNextException()) != null) {
ex.printStackTrace();
}Thank you very much, forum and bshannon at your tips.
Cheers,
Paulo Sampei. -
I have been attaching pdf files to emails forever. All of the sudden my pdf files won't attach to an email. It just sits there and spins like it's trying to attach but quits half way through. What could the problem be?
Please try repairing Reader installation on your machine. Do you get any error message while attaching the pdf file?
Regards,
Deepak -
Does mail always insert the pdf file into the email rather than attachment
How can I set mail to always attach pdf files as attachments rather than insert into the mail message?
But if you receive an email with a PDF attachment - which appears as text embedded in the email rather than an attachment are you really saying that the only way to solve this is to resend the email to yourself so that it will then appear as a PDF attachment?
-
Dear Experts,
How to send pdf file as email atachment, can some one give me some codings or links.
Thanks and REgards,
Thirukumaran. RMailing is possible when i open the pdf file it's giving the decoding error
i here with attached the codings for ur ref.
FUNCTION Z_HRFM_SEND_OFFERLETTER_MAIL.
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_APPLID) TYPE PERSNO
*" VALUE(IV_REPMGR) TYPE PERSNO
*" VALUE(IV_CONTROLMGR) TYPE PERSNO
*" VALUE(IV_REPFMGR) TYPE PERSNO
*" VALUE(IV_ACTION) TYPE MASSN
*" VALUE(JOIN_1000) TYPE DATS
*" VALUE(POSITION_1000) TYPE STEXT
*" VALUE(PLACE_1000) TYPE ORT01
*" VALUE(LOC_1000) TYPE ORT01
*" VALUE(GROSS_1000) TYPE NUMC7
*" VALUE(BASIC_1000) TYPE NUMC5
*" VALUE(CONV_1000) TYPE NUMC5
*" VALUE(FOOD_1000) TYPE NUMC5
*" VALUE(VAR_1000) TYPE NUMC5
*" VALUE(PERNR1_1000) TYPE PERSNO
*" VALUE(COMP_ADD) TYPE CHAR200
*" EXCEPTIONS
*" APPLICANT_NOT_FOUND
*" REPFORM_MGR_NOT_FOUND
*" REPMGR_NOT_FOUND
*" CONTROLMGR_NOT_FOUND
*" NO_EMAILID_FOUND
*" SENT
*" NOT_SENT
*& CREATION INFORMATION *
*& AUTHOR : thiruKumaran
*& CREATION DATE : 29.07.2009 *
*& TRANSPORT REQUEST: *
*& FUNCTIONAL SPEC# : *
*& TECHNICAL SPEC# : *
*& PURPOSE :
* Local Variable Declaration
data : EV_APPLNAME TYPE EMNAM,
EV_REPMGR_NAME TYPE EMNAM,
EV_CONTROLMGR_NAME TYPE EMNAM,
EV_CONTROLMGR_GEN TYPE CHAR2,
EV_REPMGR_GEN TYPE CHAR2,
EV_APPL_GEN TYPE CHAR2,
EV_REPFORM_GEN TYPE CHAR2,
EV_REPFORM_NAME TYPE EMNAM,
EV_STRAS TYPE STRAS,
EV_ORT01 TYPE ORT01,
EV_ORT02 TYPE ORT02.
DATA : l_APPname TYPE emnam,
l_evaluation_date TYPE begda,
l_extension_date TYPE begda,
l_emailid TYPE comm_id_long,
tab_lines TYPE sy-tabix,
fm_name TYPE rs38l_fnam.
data:/1BCDWB/FORMOUTPUT type FPFORMOUTPUT ,
/1BCDWB/DOCPARAMS type SFPDOCPARAMS ,
ie_outputparams type SFPOUTPUTPARAMS .
DATA : CONTENTS_HEX TYPE SOLIX.
* Structure Declaration
DATA : s_job_info TYPE ssfcrescl,
s_control_param TYPE ssfctrlop,
s_composer_param TYPE ssfcompop,
s_doc_data TYPE sodocchgi1.
* Internal Table Declaration
DATA : i_otfdata TYPE TABLE OF itcoo,
i_pdf TYPE TABLE OF solisti1,
i_pdfdata TYPE TABLE OF tline,
i_receivers TYPE TABLE OF somlreci1,
i_packing_list TYPE TABLE OF sopcklsti1,
i_message TYPE TABLE OF solisti1.
*& Work area declaration.
DATA : w_receivers LIKE LINE OF i_receivers,
w_packing_list LIKE LINE OF i_packing_list,
w_message LIKE LINE OF i_message.
CALL FUNCTION 'Z_HRFM_GET_OFFERED_DATA'
EXPORTING
IV_APPLID = IV_APPLID
IV_REPMGR = IV_REPMGR
IV_CONTROLMGR = IV_CONTROLMGR
IV_REPFMGR = IV_REPFMGR
IV_ACTION = IV_ACTION
IMPORTING
EV_APPLNAME = EV_APPLNAME
EV_REPMGR_NAME = EV_REPMGR_NAME
EV_CONTROLMGR_NAME = EV_CONTROLMGR_NAME
EV_CONTROLMGR_GEN = EV_CONTROLMGR_GEN
EV_REPMGR_GEN = EV_REPMGR_GEN
EV_APPL_GEN = EV_APPL_GEN
EV_REPFORM_GEN = EV_REPFORM_GEN
EV_REPFORM_NAME = EV_REPFORM_NAME
EV_STRAS = EV_STRAS
EV_ORT01 = EV_ORT01
EV_ORT02 = EV_ORT02
EXCEPTIONS
APPLICANT_NOT_FOUND = 1
REPFORM_MGR_NOT_FOUND = 2
REPMGR_NOT_FOUND = 3
CONTROLMGR_NOT_FOUND = 4
OTHERS = 5.
IF sy-subrc = 1.
RAISE applicant_not_found.
ELSEIF sy-subrc = 2.
RAISE repform_mgr_not_found.
ELSEIF sy-subrc = 3.
raise REPMGR_NOT_FOUND.
ELSEIF sy-subrc = 4.
raise CONTROLMGR_NOT_FOUND .
ENDIF.
*finding email id of applicant
SELECT SINGLE usrid_long INTO l_emailid FROM pb0105
WHERE pernr = IV_APPLID AND subty = '0010' AND endda = '99991231'."#EC *
IF sy-subrc <> 0.
RAISE no_emailid_found.
ENDIF.
* s_control_param-no_dialog = 'X'.
* s_control_param-getotf = 'X'.
* s_composer_param-tddest = 'LP01'.
* s_composer_param-tdnoprev = 'X'.
* Sending PDF by mail
CALL FUNCTION '/1BCDWB/SM00000046' "'ZHR_OFFER_FORM'
*"'/1BCDWB/SM00000046'
EXPORTING
/1BCDWB/DOCPARAMS = /1BCDWB/DOCPARAMS
APPLICANT_NAME = EV_APPLNAME
POSITION = POSITION_1000
JOINING_DATE = join_1000
REPFORM = EV_REPFORM_NAME
REPMGR = EV_REPMGR_NAME
CONTROLMGR = EV_CONTROLMGR_NAME
PLACE = PLACE_1000
APPLICANT_GENDER = EV_APPL_GEN
BASE_PLACE = loc_1000
REPMGR_GENDER = EV_REPMGR_GEN
REPFORM_GENDER = EV_REPFORM_GEN
CONTROLMGR_GENDER = EV_CONTROLMGR_GEN
GROSSS = gross_1000
BASIC = basic_1000
CONVEYANCE = conv_1000
FOOD = food_1000
VARIABLE = var_1000
CITY = ev_ORT01
DISTRICT = ev_ORT02
ADDRESS = ev_stras
C_DATE = sy-datum
APPLICANTID = pernr1_1000
comp_address = comp_add
IMPORTING
/1BCDWB/FORMOUTPUT = /1BCDWB/FORMOUTPUT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*data : binary_tab.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = /1BCDWB/FORMOUTPUT-PDF
tables
binary_tab = I_PDFDATA.
REFRESH i_pdf[].
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = i_pdfdata
content_out = i_pdf.
DESCRIBE TABLE i_pdf LINES tab_lines.
****for mailing********
w_receivers-receiver = l_emailid.
w_receivers-rec_type = 'U'.
w_receivers-com_type = 'INT'.
APPEND w_receivers TO i_receivers .
s_doc_data-obj_name = text-001.
s_doc_data-obj_descr = text-001.
CLEAR w_packing_list-transf_bin.
w_packing_list-head_start = 1.
w_packing_list-head_num = 0.
w_packing_list-body_start = 1.
w_packing_list-doc_type = 'RAW'.
w_packing_list-body_num = tab_lines.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
w_packing_list-transf_bin = 'X'.
w_packing_list-head_start = 1.
w_packing_list-head_num = 1.
w_packing_list-body_start = 1.
w_packing_list-doc_type = 'PDF'.
w_packing_list-body_num = tab_lines.
w_packing_list-doc_size = tab_lines * 255.
w_packing_list-obj_descr = text-001.
w_packing_list-obj_name = text-001.
APPEND w_packing_list TO i_packing_list.
*& Writing mail message
concatenate 'Hi' EV_APPLNAME into l_APPname separated by space.
w_message = L_APPNAME.
APPEND w_message TO i_message.
w_message = text-009.
APPEND w_message TO i_message.
w_message = text-002.
APPEND w_message TO i_message.
w_message = text-990.
APPEND w_message TO i_message.
w_message = text-003.
APPEND w_message TO i_message.
w_message = text-990.
APPEND w_message TO i_message.
w_message = text-004.
APPEND w_message TO i_message.
w_message = text-005.
APPEND w_message TO i_message.
"Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = s_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_packing_list
contents_txt = i_message
* contents_bin = i_pdf
CONTENTS_HEX = I_PDF
receivers = i_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
if sy-subrc = 0.
raise sent.
else.
raise not_sent.
endif.
* To send mail immediatly
IF sy-subrc = 0.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
AND RETURN.
ENDIF.
ENDFUNCTION.
can u give some suggestions,
Thanks and REgards,
Thirukumaran. R -
How can I embed a pdf file into the body of an email?
How can I embed a pdf file into the body of an email?
The problem is defining what it even means to “embed” a PDF file in the body of an e-mail, especially if you are dealing with a multiple page PDF file.
E-mail is either pure text, rich text (something akin to RTF in Word), or HTML. PDF is not compatible with any of these. Thus, to embed a PDF file, something has to be converted and that means the PDF would be converted to a less graphically rich raster format. But is that what you would really want?
I think that the MacOS and iOS e-mail clients do under some circumstances place an attached PDF file within HTML segments and by clicking on same, you get the equivalent of extracting the full PDF file, but I have no real experience with that.
Another alternative is HTML with a proxy image with a hyperlink to an external PDF file that is invoked when you click on the hyperlink.
Perhaps you can explain what you are really trying to accomplish and what the recipient of such an e-mail's actual experience would be?
- Dov -
How do I email an attached pdf file to stationary templates in mail.
How do I email an attach PDF file using the stationary templates in mail on lion.
I attached the PDF but when try to send it I get back a dialog box that sez:
"This message cannot be sent because it uses stationery and contains attachments that are not images. Messages with stationery cannot contain attachments that aren’t images. You can cancel and return to editing the message or remove the stationery in order to send." My choice is to cancel or remove stationary.
Is there a third party solution? Any suggestion?No
Envoyé depuis Molto pour iPad
De: pwillener
Envoyé: jeudi, février 12, 2015 07:14 AM
À: René Allamelle
Objet: how do I compress a large pdf file to fit in an email?
how do I compress a large pdf file to fit in an email?
created by pwillener in Adobe Acrobat.com Services - View the full discussion
But generally it is never a good idea to send e-documents as email attachments. Better use a file sharing service (Acrobat.com, Dropbox, Google Drive, Microsoft OneDrive, ..), upload the document, then send the shared download link via email.
If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7187079#7187079 and clicking ‘Correct’ below the answer
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7187079#7187079
To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community
For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624. -
Error in opening pdf file from mail attachment sent thru MII
Hi,
I am using MII 12.1.4 build(36).
I have created a pdf file from BLS using PDF actions block and saving the file in web location as mentioned below:
WEB://<ProjectFolder>/<subfolder>/Report.pdf
I'm using the same file as attachment in my m a i l action block with attachment content type "application/pdf" and AttachmentContent "ImageSaver.EncodedImage" or "PDFDoc.Output".
When i check the mail,i can see the attachment with some size of 8kb,but when I open the file i will get below error:
"Adobe Reader could not open Report.pdf because it is either not supported file type or because the file has been damaged(for example,it was sent as an m a i l attachment and wasn't correctly decoded)"
If I try to open the same file by exporting fit to my desktop,it opened properly.
Anything I'm missing here?
Thanks in Advane,
SureshHi,
According to below mentioned thread,this problem is fixed in 12.1.5 and above.
Re: Attachment Content When sending PDF attachment in Send Mail Step
Then I deployed the new patch ie SP07.
Here there is one problem,ie in Menu page I can see the 12.1.7(Build40),when I open the workbech,it shows the previous patch 12.1.4(Build 36).Why is it so?
All of my transactions running fine except the one which I have mentioned in my previous post.
When I run the transaction mentioned in my previous post,it threw an excption for PDF Table Action block and the error mentioned below:
[ERROR] Error found trying to execute action 'PDF_Table_0' Exception: [null]
[ERROR] [PDF_Table_0] Action: Runtime threw an exception. Exception: [java.lang.StackOverflowError]
When I can check the m a i l, I'm able to open the attached PDF file without error but without data.Is it because of the above mentioned error?
Plz help me.
-Suresh -
How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
Thank you!Hi;
That is not a workflow that is supported by the Adobe forms solutions at this time.
Thanks,
Josh -
Have bought service below to convert pdf files into word excel, Have followed instructions but cannot convert file. Please help.
AD003225761BR Produtos pedidos: Qtd. produto 1 Adobe ExportPDF, Annual (Outro,Todos os idiomas disponíveis) My email: [email protected]Hi Jwalter,
Thank you for posting on the Adobe forums,Please let us know what is the exact issue.
Also, if you want help on how to use the service, kindly try the link below.
Adobe ExportPDF FAQ
http://tv.adobe.com/watch/insights-on-acrobat-solutions/introduction-to-adobe-exportpdf/
Thanks,
Vikrantt Singh
Maybe you are looking for
-
Integrating third party recruitment with SAP
Hi folks, I had a question regarding intergrating the third party system with SAP HR masterdata. I am basically looking at transferring the applicant data from the Recruiting (third party tool ) system into SAP HR Masterdata. I found using the featur
-
Sony PMW-EX1 XDCAM EX Edit Concerns
Hi, I'm looking forward to the release of the new Sony Sony PMW-EX1 XDCAM EX camera. Does anyone know of any possible conflicts or problems with my present editing set-up? Hardware or Software? Currently I am editing on a: 2.5GHz Quad-core PowerPC G5
-
Get GP importparameters from IGPProcessInstance
Hi, I'm trying to write a custom GP monitor application. Is there a way to retrieve the importparameters of a process starting from the ProcessInstance? kr, Joachim
-
Binding a variable to an LOV query, not working... Urgent!
Hi, Based on a column value(which gets populated at runtime), in a table, the LOV query for another column in the same table, should be restricted with this value. 1. My LOV is based on a VO. Lov query is SELECT ped.full_name as employee_name, ped.em
-
Can I Drop a datafile from UNDOTBS
Hi!!!! I want to drop a datafile from UNDOTBS . can I Drop it. If yes then how to drop ? what is the effect of it on database? If anybody knows the the answer then Pls reply..