|
@@ -10,6 +10,8 @@ namespace QuestPDF.Fluent
|
|
|
{
|
|
{
|
|
|
internal Page Page { get; } = new Page();
|
|
internal Page Page { get; } = new Page();
|
|
|
|
|
|
|
|
|
|
+ #region Size
|
|
|
|
|
+
|
|
|
public void Size(float width, float height, Unit unit = Unit.Inch)
|
|
public void Size(float width, float height, Unit unit = Unit.Inch)
|
|
|
{
|
|
{
|
|
|
var pageSize = new PageSize(width, height, unit);
|
|
var pageSize = new PageSize(width, height, unit);
|
|
@@ -39,6 +41,10 @@ namespace QuestPDF.Fluent
|
|
|
{
|
|
{
|
|
|
Page.MaxSize = pageSize;
|
|
Page.MaxSize = pageSize;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region Margin
|
|
|
|
|
|
|
|
public void MarginLeft(float value, Unit unit = Unit.Point)
|
|
public void MarginLeft(float value, Unit unit = Unit.Point)
|
|
|
{
|
|
{
|
|
@@ -78,6 +84,10 @@ namespace QuestPDF.Fluent
|
|
|
MarginHorizontal(value, unit);
|
|
MarginHorizontal(value, unit);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region Properties
|
|
|
|
|
+
|
|
|
public void DefaultTextStyle(TextStyle textStyle)
|
|
public void DefaultTextStyle(TextStyle textStyle)
|
|
|
{
|
|
{
|
|
|
Page.DefaultTextStyle = textStyle;
|
|
Page.DefaultTextStyle = textStyle;
|
|
@@ -88,6 +98,16 @@ namespace QuestPDF.Fluent
|
|
|
DefaultTextStyle(handler(TextStyle.Default));
|
|
DefaultTextStyle(handler(TextStyle.Default));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public void ContentFromLeftToRight()
|
|
|
|
|
+ {
|
|
|
|
|
+ Page.ContentDirection = ContentDirection.LeftToRight;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void ContentFromRightToLeft()
|
|
|
|
|
+ {
|
|
|
|
|
+ Page.ContentDirection = ContentDirection.RightToLeft;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void PageColor(string color)
|
|
public void PageColor(string color)
|
|
|
{
|
|
{
|
|
|
Page.BackgroundColor = color;
|
|
Page.BackgroundColor = color;
|
|
@@ -99,6 +119,10 @@ namespace QuestPDF.Fluent
|
|
|
PageColor(color);
|
|
PageColor(color);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region Slots
|
|
|
|
|
+
|
|
|
public IContainer Background()
|
|
public IContainer Background()
|
|
|
{
|
|
{
|
|
|
var container = new Container();
|
|
var container = new Container();
|
|
@@ -133,6 +157,8 @@ namespace QuestPDF.Fluent
|
|
|
Page.Footer = container;
|
|
Page.Footer = container;
|
|
|
return container;
|
|
return container;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static class PageExtensions
|
|
public static class PageExtensions
|