Hello,
We are experiencing a strange problem when using Aspose.Words to print a document where we inserted a page or numpages field.
In the following snippet we create a document and add some text and fields to it before sending it to the printer.
static void Main(string[] args)
{
var doc = new Aspose.Words.Document();
DocumentBuilder db = new DocumentBuilder(doc);
db.Write("Page ");
db.InsertField("PAGE");
db.Write(" of ");
db.InsertField("NUMPAGES");
db.Write(" in this document");
doc.Print();
}
When we run this program we’d expect a printed document containing the text: “Page 1 of 1 in this document”.
The content instead is only “Page 1” and it will cut off all contant that is inserted after the call to InsertField.
We have tested this in Aspose.Words versions 11.4 ; 11.11 and 13.1. All of them give the same result.
Could this be a bug in Asponse.Words and could you suggest another way of achieving the desired result?
Thanks,
Jan-Peter