var byteArray = Convert.FromBase64String(documentBase64);
var loadedDocument = new PdfLoadedDocument(byteArray);
PageDetails = (loadedDocument.Pages.Cast<PdfPageBase>()
.Select((documentPage, i) => new PageDetails
{
Height = documentPage.Size.Height,
Width = documentPage.Size.Width,
PageNumber = i + 1
})).ToArray(),
TotalPages = loadedDocument.PageCount
|
//Load PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(pdfStream);
//Get the page rotation
for(int i=0;i<loadedDocument.Pages.Count;i++)
{
//Get the page
PdfLoadedPage loadedPage = loadedDocument.Pages[i] as PdfLoadedPage;
//Get the rotation
PdfPageRotateAngle rotation = loadedPage.Rotation;
} |