BoldDeskPremium customer service software with affordable pricing: $10 for 3 agents. Try it for free.
Hi Karlie,
Thanks for using Syncfusion products.
Syncfusion.PDF.base assembly’s Type PdfLoadedDocument does not have any Page Rotation related properties.
However, there exist a workaround for your rotate feature, which is as follows, Please find whether this is helpful for your need,
Load the PDF file into object of type PdfLoadedDocument and then create an object of type PdfDocument from it. Here, every PdfPage in the PdfPages collection of PdfDocument resides with in the object of type PdfSection.
Here in type PdfSection, the PdfPages collection within them can be subjected for rotation, with its PageSettings property. The file with the changes can be saved back to the same location.
Please find the code snippet for your help,
//The File location
public const string saveUrl = "E:/Resources/Sample.pdf";
//The Page number, which has to be rotated
public const int pageNumber = 10;
//Load the existing PDF document from the drive
PdfLoadedDocument loadedPdf = new PdfLoadedDocument(openUrl);
//Convert PdfLoadedDocument to PdfDocument object
PdfDocument pdfDoc = PdfDocument.Merge(null, loadedPdf) as PdfDocument;
//Apply necessary rotation operation to required page(s).
pdfDoc.Sections[pageNumber].PageSettings.Rotate = PdfPageRotateAngle.RotateAngle90;
//Resave the document
pdfDoc.Save(openUrl);
If you have any further queries, please contact us.
Thanks,
Sundaram R.
Hi Karlie,
Thank you for your patience,
I am afraid that I couldn’t able to reproduce the issue, I
have attached a simple sample and the output pdf file in the below link. Can
you please check with this and let me know your current product version, this
will help us to find the actual root cause for the issue.
Sample Link:
http://www.syncfusion.com/downloads/support/directtrac/135426/WindowsFormsApplication19551566329.zip
Output File:
http://www.syncfusion.com/downloads/support/directtrac/135426/Output1714935674.zip
Thanks,
Karthik.