diff --git a/PdfSharpCore/Pdf/PdfPage.cs b/PdfSharpCore/Pdf/PdfPage.cs index 94edfe8e..1d69ecb3 100644 --- a/PdfSharpCore/Pdf/PdfPage.cs +++ b/PdfSharpCore/Pdf/PdfPage.cs @@ -72,8 +72,7 @@ internal PdfPage(PdfDictionary dict) { // Set Orientation depending on /Rotate. int rotate = Elements.GetInteger(InheritablePageKeys.Rotate); - var mediaBox = Elements.GetArray(InheritablePageKeys.MediaBox); - if (Math.Abs((rotate / 90)) % 2 == 1 && mediaBox.Elements.GetReal(3) > mediaBox.Elements.GetReal(2)) + if (Math.Abs((rotate / 90)) % 2 == 1) _orientation = PageOrientation.Landscape; }