<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HTML Content as PDF Attachment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980855#M1895056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN style="color: #000000; font-size: 12px;"&gt;Vinay,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure wheather it is possible to send the email body of same email in PDF as atatchment, but you can do 1 thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a smartform print your email body content in the smartform then call your smartform before email send functionality and collect the smart form data as PDF (OTF to PDF ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to send this as a PDF attachment, and the content&amp;nbsp; of the PDF will be smartform output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Apr 2015 06:11:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-04-06T06:11:49Z</dc:date>
    <item>
      <title>HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980850#M1895051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have HTML Content in an internal table of type SOLI_TAB which is actually the body of the mail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I need to send the same content as an PDF attachment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have written the below code for adding the attachment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;CALL METHOD lp_document-&amp;gt;add_attachment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lp_document -&amp;gt; Refrence variable of the type cl_document_bcs&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_attachment_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'PDF'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_attachment_subject = iv_msg_subj &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_attachment_size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lv_size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_size -&amp;gt; Total number of lines in lt_text * 255&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_att_content_text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lt_text.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lt_text-&amp;gt; Internal Table with html content&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I tried multiple things like converting into XSTRING and various other methods. But no breakthrough.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Just want to understand can we send the HTML content as PDF Attachment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Anypointers will be helpful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Vinay Mutt&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980850#M1895051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-02T11:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980851#M1895052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this Wiki link helps you in converting&amp;nbsp; the Internal Table to PDF attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.scn.sap.com/wiki/display/Snippets/Convert+Spool+request+to+PDF+and+send+as+e-mail" title="http://wiki.scn.sap.com/wiki/display/Snippets/Convert+Spool+request+to+PDF+and+send+as+e-mail"&gt;Convert Spool request to PDF and send as e-mail - Code Gallery - SCN Wiki&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you find this helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jagraj Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:47:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980851#M1895052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-02T11:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980852#M1895053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please go through this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="1214908" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="How to convert binary data to pdf in ABAP?" href="https://community.sap.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980852#M1895053</guid>
      <dc:creator>prad_k</dc:creator>
      <dc:date>2015-04-02T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980853#M1895054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to search for a html to pdf routine.&lt;/P&gt;&lt;P&gt;try this Post.&lt;/P&gt;&lt;H1&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/10576976#10576976"&gt;Convert HTML TO PDF&lt;/A&gt;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Stefan Seeburger &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 12:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980853#M1895054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-02T12:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980854#M1895055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But all the links provided mentions the idea of SPOOL generation and Sending the mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i specified in the post, i want to send the body of the mail content as attachment in the same mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas for using the method specified in the post. Is it possible to achive through that method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because, now the pdf attachment is appearing but it is not having valid content so it is not possible to open the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regardsm,&lt;/P&gt;&lt;P&gt;Vinay Mutt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Apr 2015 07:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980854#M1895055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-05T07:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: HTML Content as PDF Attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980855#M1895056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN style="color: #000000; font-size: 12px;"&gt;Vinay,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure wheather it is possible to send the email body of same email in PDF as atatchment, but you can do 1 thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a smartform print your email body content in the smartform then call your smartform before email send functionality and collect the smart form data as PDF (OTF to PDF ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to send this as a PDF attachment, and the content&amp;nbsp; of the PDF will be smartform output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 06:11:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-content-as-pdf-attachment/m-p/10980855#M1895056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-06T06:11:49Z</dc:date>
    </item>
  </channel>
</rss>

