From 4d86dc399e73620e7aa61550760a0e73934ebf15 Mon Sep 17 00:00:00 2001 From: BobLd Date: Mon, 23 Nov 2020 11:21:10 +0000 Subject: [PATCH] Make MediaBox public --- src/UglyToad.PdfPig/Content/MediaBox.cs | 8 +++++++- src/UglyToad.PdfPig/Content/Page.cs | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/UglyToad.PdfPig/Content/MediaBox.cs b/src/UglyToad.PdfPig/Content/MediaBox.cs index e72687c0..21ea25cb 100644 --- a/src/UglyToad.PdfPig/Content/MediaBox.cs +++ b/src/UglyToad.PdfPig/Content/MediaBox.cs @@ -9,7 +9,7 @@ /// /// See table 3.27 from the PDF specification version 1.7. /// - internal class MediaBox + public class MediaBox { /// /// User space units per inch. @@ -66,8 +66,14 @@ /// public static readonly MediaBox A6 = new MediaBox(new PdfRectangle(0, 0, 105 * PointsPerMm, 148 * PointsPerMm)); + /// + /// A rectangle, expressed in default user space units, that defines the boundaries of the physical medium on which the page shall be displayed or printed. + /// public PdfRectangle Bounds { get; } + /// + /// Create a new . + /// public MediaBox(PdfRectangle? bounds) { Bounds = bounds ?? throw new ArgumentNullException(nameof(bounds)); diff --git a/src/UglyToad.PdfPig/Content/Page.cs b/src/UglyToad.PdfPig/Content/Page.cs index f611bd1e..9268147e 100644 --- a/src/UglyToad.PdfPig/Content/Page.cs +++ b/src/UglyToad.PdfPig/Content/Page.cs @@ -35,7 +35,10 @@ /// public CropBox CropBox { get; } - internal MediaBox MediaBox { get; } + /// + /// Defines the boundaries of the physical medium on which the page shall be displayed or printed. + /// + public MediaBox MediaBox { get; } internal PageContent Content { get; }