Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Feb 06, 2020 12:57 am

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.

fenderEvrby
 
Posts: 5
Joined: Mon May 21, 2018 6:29 pm

Thu Feb 06, 2020 4:21 am

Hello,

Thanks for your inquiry.
I simulated your case and indeed found the Page Rotation setting did not work. This issue has been logged into our bug tracking system with the ticket SPIREPDF-3027. We will inform you if there is any uodate. Sorry for the inconvenince caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Feb 06, 2020 4:15 pm

Thank you. I'll wait for the patch. Meanwhile, there is a way to download older versions for Spire.PDF Free?

fenderEvrby
 
Posts: 5
Joined: Mon May 21, 2018 6:29 pm

Fri Feb 07, 2020 1:51 am

Hello,

Thanks for your response.
Sorry the old versions of Free Spire.PDF are not available. We just provide the latest version since it contains more bug fixes and is more stable.
We will inform you when the hotfix is released.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Mar 04, 2020 9:55 am

Hello,

Thanks for your patient waiting.
The reported bug SPIREPDF-3027 has been fixed in the newly released Spire.PDF Pack(Hot Fix) Version:6.3.0. Welcome to download it from the following link.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/6.3.0


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Mon Mar 16, 2020 8:05 am

Hello,

Greetings from E-iceblue!
Have you tested the hotfix? Does it solve your issue?
Thanks in advance for your feedback.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Apr 02, 2020 9:19 pm

Hi, Rachel. Sorry for the time it took me to answer.
I already tested the fix and it's working now.

Thank you very much for your help.

fenderEvrby
 
Posts: 5
Joined: Mon May 21, 2018 6:29 pm

Fri Apr 03, 2020 1:10 am

Hello,

Thanks for your feedback.
If you encounter any question related to our product in the future, just feel free to contact us.
Wish you all the best!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Mar 15, 2022 7:21 pm

I'm having this issue with Spire.Pdf, Version=8.2.2.0, is anyone else?

hunterb46
 
Posts: 13
Joined: Tue Mar 15, 2022 7:16 pm

Wed Mar 16, 2022 5:52 am

Hello,

Thanks for your inquiry.
Did you encounter the same issue with page rotation? To help us look into your issue quickly and accurately, please provide your input Pdf document and your testing code. You can attach your file here or send it to us via email (support@e-iceblue.com). Thank you in advance.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Wed Mar 16, 2022 3:42 pm

I just did it on a sample pdf that has one page, i set the rotation and then called SaveAsImage, but it appears that it doesn't take the rotation into account.

PdfDocument doc = new PdfDocument(fileStream);
doc.Pages[0].Rotation = PdfPageRotateAngle.RotateAngle90;
doc.SaveAsImage(0, PdfImageType.Bitmap);

hunterb46
 
Posts: 13
Joined: Tue Mar 15, 2022 7:16 pm

Thu Mar 17, 2022 6:21 am

Hello,

Thanks for your inquiry.
I made a PDF sample and test your code, but unfortunately did not reproduce your problem. Could you please provide the following information for further investigation? You can attach your document here or send it to us by email (support@e-iceblue.com). Thank you in advance.
1) your PDF document
2) test environment, such as win10, 64bit
3) the type of application, such as Console App, .NET Framework 4.6

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Fri Mar 18, 2022 10:34 am

Hello,

I received your file.
Unfortunately, I still can't reproduce your problem in the same environment as yours. I compiled my application to an .exe, and attached it with my output image in email, please execute it on your side and tell us your result. Look forward to your reply.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Fri Mar 18, 2022 11:35 am

My company's email will block those attachments, can you attach it to here?

hunterb46
 
Posts: 13
Joined: Tue Mar 15, 2022 7:16 pm

Mon Mar 21, 2022 3:09 am

Hello,

Sorry for the late reply due to weekend.
Since our forum has 2MB limitation on attachment size, I uploaded my .exe on server, please download it from the link : https://www.e-iceblue.com/downloads/attachment/Test20455.7z. Look forward to your test feedback.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.PDF