Skip to content

Commit

Permalink
-修复获取页面可见边框的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Aug 25, 2022
1 parent 54ae9cb commit b535146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion App/Processor/PdfHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ internal static iTextSharp.text.Rectangle GetPageVisibleRectangle(this PdfDictio
c[i] = box.GetAsNumber(i).FloatValue;
}
var r = page.GetAsNumber(PdfName.ROTATE);
return r != null
return r != null && r.IntValue != 0 && r.IntValue != 180
? new iTextSharp.text.Rectangle(c[0], c[1], c[2], c[3], r.IntValue).Rotate()
: new iTextSharp.text.Rectangle(c[0], c[1], c[2], c[3]);
}
Expand Down

0 comments on commit b535146

Please sign in to comment.