We are trying to read pdf document width and height using aspose but it is giving wrong details.Please find my observations below.
Note :
If i try to read the same document with itextsharp it is giving exact dimensions.
I will attach the PDF file for reference.
Ex: 1. Using Itext Sharp – 644.4x203.
2. Using Aspose.PDF – 595x842.
Here comes sample program
//WIth Itext Sharp
PdfReader pdfReader = new PdfReader(sourcePdfUrl);
iTextSharp.text.Rectangle currentPageRectangle = pdfReader.GetPageSize(1);
Width =currentPageRectangle.Width;
Height =currentPageRectangle.Height;
//With Aspose
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(sourcePdfUrl);
Width =pdfDocument.PageInfo.Width;
Height = pdfDocument.PageInfo.Height;
Thanks in advance!YOUR_LOGO.pdf (283.3 KB)