Skip to content

Commit

Permalink
Setup orientation based on /Rotate only.
Browse files Browse the repository at this point in the history
  • Loading branch information
noctis0430 committed Sep 27, 2023
1 parent 3e02529 commit 8b5fa7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PdfSharpCore/Pdf/PdfPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8b5fa7b

Please sign in to comment.