Improved respecting spaces at the beginning and end of text block, fixed breaking long words that do not fit in line

This commit is contained in:
MarcinZiabek
2022-03-26 02:58:55 +01:00
parent 78c5049eda
commit 0711bca1e1
5 changed files with 38 additions and 11 deletions
+30
View File
@@ -371,5 +371,35 @@ namespace QuestPDF.Examples
});
});
}
[Test]
public void BreakingLongWord()
{
RenderingTest
.Create()
.ProduceImages()
.ShowResults()
.RenderDocument(container =>
{
container.Page(page =>
{
page.Margin(50);
page.PageColor(Colors.White);
page.Size(PageSizes.A4);
page.Content().Column(column =>
{
column.Item().Text(null);
column.Item().Text(text =>
{
text.DefaultTextStyle(x => x.BackgroundColor(Colors.Red.Lighten3));
text.Span(" " + Placeholders.LoremIpsum() + " 0123456789012345678901234567890123456789012345678901234567890123456789 ").FontSize(24);
});
});
});
});
}
}
}