diff --git a/QuestPDF.Examples/InlinedExamples.cs b/QuestPDF.Examples/InlinedExamples.cs index adf4e68..95c21ef 100644 --- a/QuestPDF.Examples/InlinedExamples.cs +++ b/QuestPDF.Examples/InlinedExamples.cs @@ -87,23 +87,24 @@ namespace QuestPDF.Examples { RenderingTest .Create() - .PageSize(400, 250) + .PageSize(800, 600) .ProduceImages() .ShowResults() .Render(container => { container .Padding(20) + .Box() .Border(1) - .Background(Colors.Grey.Lighten3) + .Background(Colors.Grey.Lighten4) .Inlined(inlined => { inlined.VerticalSpacing(50); - inlined.HorizontalSpacing(20); - inlined.AlignSpaceAround(); - inlined.BaselineTop(); + inlined.HorizontalSpacing(25); + inlined.AlignRight(); + inlined.BaselineMiddle(); - foreach (var _ in Enumerable.Range(0, 20)) + foreach (var _ in Enumerable.Range(0, 100)) inlined.Item().Element(RandomBlock); }); }); diff --git a/QuestPDF/Elements/Inlined.cs b/QuestPDF/Elements/Inlined.cs index 8f0cb0b..5ae35d3 100644 --- a/QuestPDF/Elements/Inlined.cs +++ b/QuestPDF/Elements/Inlined.cs @@ -64,8 +64,9 @@ namespace QuestPDF.Elements .Select(line => { var size = GetLineSize(line); - var heightWithSpacing = size.Height + (line.Count - 1) * HorizontalSpacing; - return new Size(size.Width, heightWithSpacing); + + var widthWithSpacing = size.Width + (line.Count - 1) * HorizontalSpacing; + return new Size(widthWithSpacing, size.Height); }) .ToList(); diff --git a/QuestPDF/QuestPDF.csproj b/QuestPDF/QuestPDF.csproj index 665321d..4179f2f 100644 --- a/QuestPDF/QuestPDF.csproj +++ b/QuestPDF/QuestPDF.csproj @@ -4,7 +4,7 @@ MarcinZiabek CodeFlint QuestPDF - 2021.11.3 + 2021.11.4 QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt")) 8 diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt index 9ac18b7..debea0f 100644 --- a/QuestPDF/Resources/ReleaseNotes.txt +++ b/QuestPDF/Resources/ReleaseNotes.txt @@ -15,3 +15,5 @@ - Improved text element: it does not throw an exception when an argument is null. - All new releases of QuestPDF will contain symbol packages. Let's welcome simplified debugging experience 🎉 + +- 2021.11.4 - Fixed the Inlined element not rendering properly in some cases.