PDF.net on270 rotation not working

Hi

Trying to rotate 2 single page PDFs, the on90 rotation works but the on270 doesn’t appear to?

        var pageDoc = new Aspose.Pdf.Document(@"C:\706032.pdf");
        pageDoc.Pages[1].Rotate = Aspose.Pdf.Rotation.on270;
        pageDoc.Save(@"C:\706032_Fixed.pdf");

        pageDoc = new Aspose.Pdf.Document(@"C:\706034.pdf");
        pageDoc.Pages[1].Rotate = Aspose.Pdf.Rotation.on90;
        pageDoc.Save(@"C:\706034_Fixed.pdf");

The on90 rotation is fine but for the first file it doesn’t seem to be doing 270 clockwise?

Thanks

Si

706032.pdf (32.1 KB)
706034.pdf (31.8 KB)

@simon.fairey

Thank you for contacting support.

We have been able to notice the issue with 706032.pdf file in our environment. A ticket with ID PDFNET-46036 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Interestingly if I do an on90 instead of on270 on the first document it seems to work?

Not sure how it knows to rotate 90 clockwise for one and counter-clockwise for the other?

I also added an page that is upsidedown 706033.pdf (38.4 KB) and on180 failed but again on90 worked?

So now with the 3 images I have:

        var pageDoc1 = new Aspose.Pdf.Document(@"C:\temp\rotationissue\706032.pdf");
        pageDoc1.Pages[1].Rotate = Aspose.Pdf.Rotation.on90;
        pageDoc1.Save(@"C:\temp\rotationissue\706032_Fixed.pdf");

        var pageDoc2 = new Aspose.Pdf.Document(@"C:\temp\rotationissue\706033.pdf");
        pageDoc2.Pages[1].Rotate = Aspose.Pdf.Rotation.on90;
        pageDoc2.Save(@"C:\temp\rotationissue\706033_Fixed.pdf");

        var pageDoc3 = new Aspose.Pdf.Document(@"C:\temp\rotationissue\706034.pdf");
        pageDoc3.Pages[1].Rotate = Aspose.Pdf.Rotation.on90;
        pageDoc3.Save(@"C:\temp\rotationissue\706034_Fixed.pdf");

and no clue as to why they all work but only when rotated by on90!

Further info which might explain the on90 is that before I set the rotate value for the 3 images it thinks the initial rotate values are:

on180
on270
none

Not sure why it thinks the last file has no rotation?

@simon.fairey

Thank you for elaborating it further.

We have recorded your findings under same ticket and will update you as soon as some significant update will be available.

Question - Is there a way to reset the Rotate property to None without it actually doing any rotation when you save the page/document?

@simon.fairey

We are afraid that setting value to none or removing the value of Rotate property without any changes in orientation may not be possible. However, as you have also found out, a ticket with ID PDFNET-39040 is already logged in our issue management system for further investigations. We have recorded your concerns and will let you know as soon as any significant update will be available in this regard.