Hi,
I noticed some issues when invoke UpdatePageLayout and UpdateTableLayout method before using aspose.Words(19.8) for print in some specific scenarios.
My test document paper A.zip (941.0 KB)
The “Question 7” on page 8 is a table which include some sub tables, for some reason, we set the outer table(Question 7) auto fit content and some inner tables that may be out of bounds also auto fit content, it seem to be no problem in word. the out range of table content also be adjusted.
image.png (63.9 KB)
image.png (88.1 KB)
image.png (84.4 KB)
Print code:
public static void Print(Document doc)
{
doc.UpdateTableLayout();
doc.UpdatePageLayout();
PrinterSettings ps = BuildPrinterSetting();
AsposeWordsPrintDocument awPrintDoc = new AsposeWordsPrintDocument(doc);
awPrintDoc.PrinterSettings = ps;
awPrintDoc.Print();
}
private static PrinterSettings BuildPrinterSetting()
{
PrinterSettings ps = new PrinterSettings();
ps.Copies = 1;
ps.PrinterName = "aaa";
ps.Collate = true;
ps.PrintRange = PrintRange.AllPages;
ps.DefaultPageSettings.Color = true;
ps.Duplex = Duplex.Vertical;
return ps;
}
the print out word inconsistency with word, e.g.image.png (150.8 KB)
the table in header is also different from the word.image.png (21.5 KB)
so, is there any other way or backround to ensure the printed word is consistency width the MS word print.
Notes:
when comment the method UpdateTableLayout & UpdatePageLayout method , it work perfect!