I’ve attached a simple landscape document…
TestLandscapeDocPDF.pdf (33.0 KB)
… created with MS word. When loaded using Aspose PDF PageInfo.IsLandscape is resolving to false and page.PageInfo.Width seems to actually be the height of the document and page.PageInfo.Height seems to be the width.
As I’m attempting to render something in the PDF the width of the page, this is a blocking issue for me.
The issue is replicated with the following code.
[TestMethod]
public void TestLandscape()
{
Document document = new Document(@"D:\Temp\TestLandscapeDocPDF.pdf");
foreach (Page page in document.Pages)
{
Assert.IsTrue(
page.PageInfo.IsLandscape ||
(
page.PageInfo.Width > page.PageInfo.Height
));
}
}