-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
20 lines (18 loc) · 772 Bytes
/
Program.cs
File metadata and controls
20 lines (18 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using DevExpress.Pdf;
using System.Diagnostics;
namespace PdfPageRotationExample {
class Program {
static void Main(string[] args) {
using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor()) {
pdfDocumentProcessor.LoadDocument("..\\..\\..\\docs\\TextRotate.pdf");
int angle = 0;
foreach (PdfPage page in pdfDocumentProcessor.Document.Pages) {
angle = (angle + 90) % 360;
page.Rotate = angle;
}
pdfDocumentProcessor.SaveDocument("..\\..\\..\\docs\\Rotated.pdf");
}
Process.Start(new ProcessStartInfo("..\\..\\..\\docs\\Rotated.pdf") { UseShellExecute = true });
}
}
}