From c13dbee6b3c13d01a19abb77d662ba49cebf2069 Mon Sep 17 00:00:00 2001 From: ValAnn Date: Fri, 27 Sep 2024 14:33:35 +0400 Subject: [PATCH] done --- Valova_App/Form1.cs | 4 +++- .../Valova_VisualComponents/ComponentTextToPdf.cs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Valova_App/Form1.cs b/Valova_App/Form1.cs index b7ae102..8f4c51c 100644 --- a/Valova_App/Form1.cs +++ b/Valova_App/Form1.cs @@ -97,11 +97,13 @@ namespace custom_App FilePath = "C:\\Users\\User\\Desktop\\PdfDocumentWithTableHeaderRow.pdf", Header = "Заголовок", UseUnion = true, - ColumnsRowsWidth = new List<(int, int)> { (20, 0), (20, 0) }, + ColumnsRowsWidth = new List<(int, int)> { (20, 0), (20, 0), (15, 0), (15, 0) }, ColumnUnion = new List<(int StartIndex, int Count)> { (0, 2)}, Headers = new List<(int ColumnIndex, int RowIndex, string Header, string PropertyName)> { (0, 0, "Книги", "Books"), + (2, 0, "Просто автор", "Author"), + (3, 0, "Просто название", "Name"), (0, 1, "Название", "Name"), (1, 1, "Автор", "Author") }, diff --git a/Valova_VisualComponents/Valova_VisualComponents/ComponentTextToPdf.cs b/Valova_VisualComponents/Valova_VisualComponents/ComponentTextToPdf.cs index 358a4f5..ad600fa 100644 --- a/Valova_VisualComponents/Valova_VisualComponents/ComponentTextToPdf.cs +++ b/Valova_VisualComponents/Valova_VisualComponents/ComponentTextToPdf.cs @@ -58,7 +58,7 @@ namespace Valova_VisualComponents public void CreateDoc(ComponentTextToPdfConfig config) { - //config.CheckFields(); + CreateHeader(config.Header); foreach (string paragraph in config.Paragraphs) { @@ -73,6 +73,7 @@ namespace Valova_VisualComponents var section = this.Document.AddSection(); var paragraph = section.AddParagraph(header); paragraph.Format.Font.Color = Colors.Black; + paragraph.Format.Font.Size = 30; paragraph.Format.Font.Bold = true; }