Posted by a ceTe Software moderator
Hello,
DynamicPDF Viewer for .NET can only display the PDF and it is not capable of modifying and saving the PDF. It is not possible to achieve your requirements with DynamicPDF Viewer for .NET alone.
Along with DynamicPDF Viewer for .NET you would need to use
DynamicPDF Merger for .NET to rotate the PDF pages and save the modified PDF back to the source path. Here is the sample code that shows how to programmatically rotate a PDF page.
//Loading the input PDF.
string filepath = @"E:\Temp\DocumentA.pdf";
byte[] pdfByteData = File.ReadAllBytes(filepath);
PdfDocument pdf = new PdfDocument(pdfByteData);
MergeDocument mergeDocument = new MergeDocument(pdf);
//Access the page using index.
Page page = mergeDocument.Pages[1];//this will access the second page.
//Setting rotation.
page.Rotate = 90;
//Saving the modified PDF back to the same location.
mergeDocument.Draw(filepath);
Evaluation edition of DynamicPDF Merger is available for download
here.
Thanks,
ceTe Software Support Team.