Hi Nguyen
Thinh,
Thank
you for reaching out.
In
the .NET MAUI PDF Viewer, there is no direct API to retrieve page dimensions
such as width and height. However, you can determine the page size using the
PdfLoadedDocument API from the Syncfusion PDF library.
Please
refer to the following code snippet to get the dimensions of the first page:
|
//
Load the PDF
PdfLoadedDocument
loadedDocument = new PdfLoadedDocument(stream);
//
Get the first page size
var
pageSize = loadedDocument.Pages[0].Size;
double
width = pageSize.Width;
double
height = pageSize.Height;
|
To
get the dimensions of all pages, you can iterate through the Pages collection
using a loop and access each page’s size.
Please
let us know if you need any further assistance.
Regards,
Bharathi
S