|
@@ -1,6 +1,8 @@
|
|
|
using System;
|
|
using System;
|
|
|
using QuestPDF.Infrastructure;
|
|
using QuestPDF.Infrastructure;
|
|
|
|
|
|
|
|
|
|
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
|
|
|
|
+
|
|
|
namespace QuestPDF.Helpers
|
|
namespace QuestPDF.Helpers
|
|
|
{
|
|
{
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -78,11 +80,17 @@ namespace QuestPDF.Helpers
|
|
|
|
|
|
|
|
public static class PageSizeExtensions
|
|
public static class PageSizeExtensions
|
|
|
{
|
|
{
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Sets page size to a portrait orientation, making the width smaller than the height.
|
|
|
|
|
+ /// </summary>
|
|
|
public static PageSize Portrait(this PageSize size)
|
|
public static PageSize Portrait(this PageSize size)
|
|
|
{
|
|
{
|
|
|
return new PageSize(Math.Min(size.Width, size.Height), Math.Max(size.Width, size.Height));
|
|
return new PageSize(Math.Min(size.Width, size.Height), Math.Max(size.Width, size.Height));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Sets page size to a landscape orientation, making the width bigger than the height.
|
|
|
|
|
+ /// </summary>
|
|
|
public static PageSize Landscape(this PageSize size)
|
|
public static PageSize Landscape(this PageSize size)
|
|
|
{
|
|
{
|
|
|
return new PageSize(Math.Max(size.Width, size.Height), Math.Min(size.Width, size.Height));
|
|
return new PageSize(Math.Max(size.Width, size.Height), Math.Min(size.Width, size.Height));
|