| | |
| | | /// 构建文字 |
| | | /// </summary> |
| | | /// <param name="content"></param> |
| | | public void structureLeft20Text(string content) |
| | | { |
| | | _builder.ParagraphFormat.Alignment = _fontalignment; |
| | | _builder.SetBuilderFont(_font, _fontSize, _fontcolor, _isBlod); |
| | | _builder.ParagraphFormat.SpaceBefore = 5; |
| | | _builder.ParagraphFormat.FirstLineIndent = 30; |
| | | _builder.Writeln(content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加空行 |
| | | /// </summary> |
| | | /// <param name="content"></param> |
| | | public void AddBlankLine() |
| | | { |
| | | _builder.Writeln(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 构建文字 |
| | | /// </summary> |
| | | /// <param name="content"></param> |
| | | public void structureText(string content) |
| | | { |
| | | _builder.ParagraphFormat.Alignment = _fontalignment; |
| | | _builder.SetBuilderFont(_font, _fontSize, _fontcolor, _isBlod); |
| | | _builder.ParagraphFormat.SpaceBefore = 5; |
| | | _builder.ParagraphFormat.LeftIndent = 0; |
| | | _builder.Writeln(content); |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public void structureCell(string content) |
| | | { |
| | | _builder.ParagraphFormat.FirstLineIndent = 0; |
| | | _builder.ParagraphFormat.LeftIndent = 2; |
| | | var cell = _builder.InsertCell(); |
| | | //_builder.InsertParagraph(); // 添加一个新段落 |
| | | //_builder.ParagraphFormat.Alignment = ParagraphAlignment.Center; // 设置段落垂直居中 |
| | |
| | | |
| | | //builder.CellFormat.Shading.BackgroundPatternColor = System.Drawing.Color.FromArgb(red, green, blue);//设置单元格背景色 |
| | | //builder.Underline = isUnderline; |
| | | if (content == null) |
| | | { |
| | | _builder.Write(""); // 在新段落中写入内容 |
| | | return; |
| | | } |
| | | |
| | | _builder.Write(content); // 在新段落中写入内容 |
| | | //cell.FirstParagraph.Remove(); |
| | | } |