hi, I'm trying to rotate a Document using page.Rotation property, unfortunately this is not working. Here´s my full code:
FileStream file = File.Open(@"C:\myFile.pdf", FileMode.Open);
Stream fileStream = file as Stream;
PdfDocument doc = new PdfDocument(fileStream);
PdfPageBase page = doc.Pages[doc.Pages.Count - 1];
if (page.Rotation != PdfPageRotateAngle.RotateAngle0)
{ page.Rotation = PdfPageRotateAngle.RotateAngle0; }
Stream stream2 = new MemoryStream();
doc.SaveToStream(stream2, FileFormat.PDF);
doc.SaveToFile(@"C:\ejemploPDF.pdf");
page.Rotation always stays in its original value even when I already changed it.
I'm using Spire.PDF version 5.10.5.20040, which I downloaded from here: e-iceblue.com/Download/download-pdf-for-net-free.html
I used other version spire.pdf_4.8.5 and worked fine, but I don't have it anymore.
I hope you can help me.