Browse Source

Added the TableContinued example

Marcin Ziąbek 1 year ago
parent
commit
9ce61b80af
1 changed files with 34 additions and 0 deletions
  1. 34 0
      Source/QuestPDF.Examples/TableExamples.cs

+ 34 - 0
Source/QuestPDF.Examples/TableExamples.cs

@@ -317,6 +317,40 @@ namespace QuestPDF.Examples
                 });
         }
         
+        [Test]
+        public void TableContinued()
+        {
+            RenderingTest
+                .Create()
+                .ProducePdf()
+                .PageSize(PageSizes.A5)
+                .ShowResults()
+                .Render(container =>
+                {
+                    var content = new[]
+                    {
+                        ("Label 1", "Value 234"),
+                        ("Label 12", "Value 34"),
+                        ("Label 123", "Value 4")
+                    };
+                    
+                    container
+                        .Padding(20)
+                        .AlignRight()
+                        .Column(column =>
+                        {
+                            foreach (var value in content)
+                            {
+                                column.Item().AlignRight().Row(row =>
+                                {
+                                    row.AutoItem().Text($"{value.Item1}:").Bold();
+                                    row.ConstantItem(75).AlignRight().Text(value.Item2);
+                                });
+                            }
+                        });
+                });
+        }
+        
         [Test]
         public void Bug_RowSpanWorksIncorrectly()
         {