Skip to content

Create the IUriStreamProvider implementation to insert images from a database.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/how-to-use-images-in-richedit-mail-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Embed Images into a Mail Merge Template

This example illustrates how to use the IUriStreamProvider implementation to insert images from a database.

Implementation Details

The INCLUDEPICTURE field in the template has a nested MERGEFIELD that refers to the CategodyID field from the database. The "dbimg://" prefix is a stream generated by the IUriStreamProvider implementation. The GetStream method parses the received URI (the INCLUDEPICTURE field), finds the required data row, and returns the MemoryStream with an image.

Tip: You can use a DOCVARIABLE field to insert images to a template. Refer to the following topic for more information: Handle the CalculateDocumentVariable Event to Insert a Document Element

Files to Review

More Examples

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)