Layout Updates
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
namespace Server
|
||||
using QuestPDF.Fluent;
|
||||
using QuestPDF.Infrastructure;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static bool IsNullOrWhiteSpace(this string? value) => string.IsNullOrWhiteSpace(value);
|
||||
#region Public Method TextSmall
|
||||
|
||||
/// Adds a small text element to the specified container with an optional bold style.
|
||||
/// <param name="container">The container to which the text element will be added.</param>
|
||||
/// <param name="text">The text content to be displayed.</param>
|
||||
/// <param name="bold">Indicates whether the text should be displayed in bold. Defaults to false.</param>
|
||||
public static void TextSmall(this IContainer container, string? text, bool bold = false)
|
||||
{
|
||||
container.Text(txt =>
|
||||
{
|
||||
var spanDescriptor = txt.Span(text).FontSize(8);
|
||||
if (bold) spanDescriptor.SemiBold();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user