Does Aspose.Word support graphics?


#1

This is from Rob Keast:

Hi there,

I’ve just read about Aspose.Word on the 123aspx.com newsletter.

It appears to do exactly what we want however, I have a couple of questions.

We have developed a web based application for a group of Real Estate Agents in the UK.

We need a means for them to print out details about properties they are marketing from pre-defined templates.

I have no doubt that Aspose.Word is what we are looking for from the text formatting point of view, but our customers also need to merge photographs of the properties into the documents as well.

Does Aspose.Word allow the user to set up areas on a merge template for graphics place holders that can be replaced with specific photographs during the merge?
Thanks for your help
Rob Keast


#2

Hi Rob,

We are working on support for graphics right now and it will be possible to include them during mail merge operation in Aspose.Word 1.2 which is schedule for end of Februrary. As a beta this feature is likely to be available even earlier.


#3

Hi Rob,

What sort of API do you see for this feature?

A possible example of this could be:
1. You insert mail merge fields into the document and field name might have some special code, for example Image:ProductImage or maybe just a normal field name.
2. Aspose.Word provides an event that you can handle. The event is raised every time a mail merge field is encountered so you can provide data to be inserted back to Aspose.Word. The event can be for all mail merge fields or for image fields only.

Another example:
Existing MailMergr.Execute method performs merge either from an array of objects or a DataTable which can also hold objects. Maybe you can set picture objects as values inside the array of objects of DataTable and pass to Aspose.Word. In this case Aspose.Word does not need to raise events to call back, but it could be memory demanding to load all pictures and put them into DataTable upfront before merge.

Please give us details how your pictures are stored and how they can be loaded by the program. I will work out a useable API for this.