|
@@ -3,7 +3,9 @@ using Aspose.Words;
|
|
|
using Aspose.Words.Drawing;
|
|
|
using Aspose.Words.Tables;
|
|
|
using Microsoft.AspNetCore.SignalR;
|
|
|
+using MySqlX.XDevAPI.Relational;
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
+using NPOI.SS.Format;
|
|
|
using NPOI.SS.UserModel;
|
|
|
using NPOI.SS.Util;
|
|
|
using NPOI.XSSF.UserModel;
|
|
@@ -10901,6 +10903,7 @@ ORDER by gctggrc.id DESC
|
|
|
builder.ParagraphFormat.Style.Font.Bold = true;
|
|
|
builder.Writeln(@$"VOUCHER No:{item.CheckNumber} DATE: {item.CreateTime.ToString("yyyy-MM-dd")}");
|
|
|
|
|
|
+
|
|
|
builder.StartTable();
|
|
|
|
|
|
|
|
@@ -10913,11 +10916,13 @@ ORDER by gctggrc.id DESC
|
|
|
builder.InsertCell();
|
|
|
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
|
|
|
builder.CellFormat.HorizontalMerge = CellMerge.None;
|
|
|
+
|
|
|
builder.ParagraphFormat.Style.Font.Name = "微软雅黑";
|
|
|
builder.ParagraphFormat.Style.Font.Size = 7.5;
|
|
|
- builder.ParagraphFormat.Style.Font.Bold = false;
|
|
|
builder.CellFormat.FitText = true;
|
|
|
- builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
|
|
|
+ builder.CellFormat.WrapText = true;
|
|
|
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
|
|
|
+ builder.RowFormat.AllowBreakAcrossPages = false;
|
|
|
builder.ParagraphFormat.SpaceBefore = 0;
|
|
|
builder.ParagraphFormat.SpaceAfter = 0;
|
|
|
builder.ParagraphFormat.LineSpacingRule = LineSpacingRule.Exactly;
|
|
@@ -11342,6 +11347,24 @@ ORDER by gctggrc.id DESC
|
|
|
builder.Writeln("");
|
|
|
}
|
|
|
|
|
|
+ #region 获取文档中的所有表格 设置文字自适应
|
|
|
+
|
|
|
+
|
|
|
+ foreach (Table table in doc.GetChildNodes(NodeType.Table, true))
|
|
|
+ {
|
|
|
+
|
|
|
+ foreach (Aspose.Words.Tables.Row row in table.Rows)
|
|
|
+ {
|
|
|
+ foreach (Cell cell in row.Cells)
|
|
|
+ {
|
|
|
+ Aspose.Words.Tables.CellFormat cellFormat = cell.CellFormat;
|
|
|
+ cellFormat.Width = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
|
|
|
|
|
|
#region 设置页眉
|