empira / PDFsharp-1.5

A .NET library for processing PDF
MIT License
1.28k stars 588 forks source link

Incorrect size of pdf page in landscape orientation. #128

Open Daeamon opened 4 years ago

Daeamon commented 4 years ago

Hello, i have issue with incorrect calculated page size pdfsharp 1.50.5147. In 1.32.3057 all work fine with this code: if (page.MediaBox.Width != page.Width.Point || page.MediaBox.Height != page.Height.Point) { page.MediaBox = new PdfRectangle(new XPoint(0, 0), new XPoint(page.Width.Point, page.Height.Point)); } In example of project the image should appear in the lower right corner of the page. watermark-to-pdf.zip