We have documents that have an INCLUDEPICTURE field. The image filename is provided by another field so that it looks something like this: {INCLUDEPICTURE {MERGEFIELD }}. Basically the filename for INCLUDEPICTURE is provided by another mergefield. These documents are created outside of Aspose.Words, but we use Aspose to print. The MERGEFIELD that provides the filename has been resolved and contains the correct result at the time of printing. The code looks something like this:
Aspose.Words.Document doc;
var documentBytes = Encoding.UTF8.GetBytes(rtfDocument);
using (var docStream = new MemoryStream(documentBytes))
{
doc = new Aspose.Words.Document(docStream, new LoadOptions
{
PreserveIncludePictureField = true
});
}
var printSettings = new PrinterSettings();
printSettings.PrinterName = printerName;
printSettings.Copies = (short)copies;
doc.Print(printSettings);
The document, if viewed in Word will show the image in the IncludePicture field. If printed, the image does not show. I have tried this with and without the PreserveIncludePictureField option.
I can provide sample documents, but the setup is pretty straightforward as I have described.
Thanks.