diff --git a/QuestPDF.Examples/TextBenchmark.cs b/QuestPDF.Examples/TextBenchmark.cs index 9a9a10d..ef20f2e 100644 --- a/QuestPDF.Examples/TextBenchmark.cs +++ b/QuestPDF.Examples/TextBenchmark.cs @@ -181,7 +181,7 @@ namespace QuestPDF.Examples stack.Item().Text(text => { - text.ParagraphSpacing(10); + text.ParagraphSpacing(5); text.Span(content, normalStyle); }); diff --git a/QuestPDF/Elements/Stack.cs b/QuestPDF/Elements/Stack.cs index 48d7cd3..46d1968 100644 --- a/QuestPDF/Elements/Stack.cs +++ b/QuestPDF/Elements/Stack.cs @@ -74,7 +74,7 @@ namespace QuestPDF.Elements return; var firstHeight = firstSize?.Height ?? 0; - var spaceForSecond = new Size(availableSpace.Width, availableSpace.Height - firstHeight + Size.Epsilon); + var spaceForSecond = new Size(availableSpace.Width, availableSpace.Height - firstHeight); var secondMeasurement = Second?.Measure(spaceForSecond) as Size; if (secondMeasurement == null) diff --git a/QuestPDF/Elements/Text/TextBlock.cs b/QuestPDF/Elements/Text/TextBlock.cs index e09012e..055f921 100644 --- a/QuestPDF/Elements/Text/TextBlock.cs +++ b/QuestPDF/Elements/Text/TextBlock.cs @@ -34,7 +34,7 @@ namespace QuestPDF.Elements.Text var width = lines.Max(x => x.Width); var height = lines.Sum(x => x.LineHeight); - if (width > availableSpace.Width || height > availableSpace.Height) + if (width > availableSpace.Width + Size.Epsilon || height > availableSpace.Height + Size.Epsilon) return new Wrap(); var fullyRenderedItemsCount = lines