We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get Page Dimensions (Height/Width) using Aspose.PDF for .NET-Getting wrong page info using pdfDocument

Hi I am getting wrong information reported back for a pdf document. I have included the code, document and expected vs actual results. In short the pdf document read by Aspose is not reporting the width/height, or is landscape properly.

Here are the results:
Expected Output:
Page: 1
Width: 11.69
Height: 8.26
Is Landscape: true

Page: 2
Width: 8.5
Height: 11
Is Landscape: false

Page: 3
Width: 11
Height: 8.5
Is Landscape: true

Actual Output:
Page: 1:
page.PageInfo.Width: 8.26388888888889
page.Rect.Width: 8.26388888888889
Height: 11.6944444444444
page.Rect.Height: 11.6944444444444
Is Landscape: False

Page: 2:
page.PageInfo.Width: 8.26388888888889
page.Rect.Width: 11
Height: 11.6944444444444
page.Rect.Height: 8.5
Is Landscape: False

Page: 3:
page.PageInfo.Width: 8.26388888888889
page.Rect.Width: 8.5
Height: 11.6944444444444
page.Rect.Height: 11
Is Landscape: False

ToAspose.zip (460.8 KB)


Thanks for contacting support.

We have logged an issue as PDFNET-47762 in our issue tracking system after observing it in our environment with Aspose.PDF for .NET 20.2. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.