int rotation = (int)p.Rotation;
rotation += (int)PdfPageRotateAngle.RotateAngle270;
p.Rotation = (PdfPageRotateAngle)rotation;
Any insight into what I am doing wrong?
- Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pdfFile);
foreach (PdfPageBase p in doc.Pages)
{
int rotation = (int)p.Rotation;
rotation += (int)PdfPageRotateAngle.RotateAngle270;
p.Rotation = (PdfPageRotateAngle)rotation;
}
doc.SaveToFile(currentFolder + "\\cleaned.pdf");
doc.Close();
Regards,
Adam