In the documentation I can not find anything about merging pictures within a merge range:
Name Price Image
«RangeStart:Products»«Name»
«Price»
«Picture:Image»«RangeEnd:Products»
Showing the products with name and price worked until I added the 3rd property Image with prefix Picture:
but my images are not rendered...
WHY ?
my data:
private List<PdfProduct> GetDataList()
{
var products = new List<PdfProduct> {
new PdfProduct { Name = "dodamax", Price = 250.25, Image = File.ReadAllBytes($"./{DocumentFolder}/test1.jpg") },
new PdfProduct { Name = "Comparex", Price = 230.25, Image = File.ReadAllBytes($"./{DocumentFolder}/test2.jpg") },
};
return products;
}
How are you executing the mail merge process, note that it should be like this:
document.MailMerge.Execute(products, "Products");
Or if that List<PdfProduct>
is a part of another object that is your data source, then it should be assigned to a property that's named "Products".
Also, if you're still experiencing an issue, what version of GemBox.Document are you using?
Note that older versions of GemBox.Document didn't have special handling for fields with the "Picture:" prefix.
Last, are you saving the result as DOCX or PDF, try saving it to both to see if the problem occurs in just one format or on both.