It's possible to write images along with HTML text.
Sample Code:
1. Create a new HTML Object as follows:
!html <>
!body
!img src="cid:23abc@pc27" /
!/html
!/body
cid stands for the Content Id
2. Sample PeopleCode:
Local string &STRLURL = GetURL(URL.IMG_PATH);
&image.SetAttachmentContent(&STRLURL, %FilePath_Absolute, "sample.jpg", "This is a sample image!", "", "");
/* The Content ID in the code (Highlighted) must be same as Content ID in HTML */
&image.AddHeader("Content-ID", "23abc@pc27");
We have used this to display html image and text in email notifications. You could try it for documents and let us know if it works for you.
No comments:
Post a Comment