|94248||Apr 30,2010 07:57 PM UTC||Mar 23,2015 08:31 AM UTC||WinForms||3|
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
If you have any further queries, please contact us.
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.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
or the page will be automatically redirected to sign-in page in 10 seconds.