Fixed breaking long words

This commit is contained in:
MarcinZiabek
2022-05-05 23:52:17 +02:00
parent f3d4151273
commit 4da3ef5dfa
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ namespace QuestPDF.Examples
.ProducePdf()
.PageSize(PageSizes.A4)
.ShowResults()
.MaxPages(20_000)
.MaxPages(10_000)
.EnableCaching(true)
.EnableDebugging(false)
.Render(container =>
@@ -27,7 +27,7 @@ namespace QuestPDF.Examples
.Border(1)
.Table(table =>
{
const int numberOfRows = 250_000;
const int numberOfRows = 100_000;
const int numberOfColumns = 10;
table.ColumnsDefinition(columns =>
+1 -1
View File
@@ -397,7 +397,7 @@ namespace QuestPDF.Examples
text.DefaultTextStyle(x => x.BackgroundColor(Colors.Red.Lighten3).FontSize(24));
text.Span(" " + Placeholders.LoremIpsum());
text.Span(" 0123456789012345678901234567890123456789012345678901234567890123456789 ").WrapAnywhere();
text.Span(" 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ").WrapAnywhere();
});
});
});
@@ -119,7 +119,7 @@ namespace QuestPDF.Elements.Text.Items
// there is no available space to wrap text
// if the item is first within the line, perform safe mode and chop the word
// otherwise, move the item into the next line
return isFirstElementInLine ? (textLength, textLength + 1) : null;
return isFirstElementInLine ? (textLength, textLength) : null;
}
public virtual void Draw(TextDrawingRequest request)