Rotation of image generated by pdf

Hi Team,

I am rotating a pdf document page but if I rotate for the first time by 90 it works fine. next time if I rotate the same page by 90 it should get rotated by 180 because it was already at 90 rotation but it does not rotate.below is my code.

PageCollection pageCollection = pdfDocument.getPages();

// Rotate the page if necessary

for (WipDocumentPage wipDocumentPage : wipDocument

.getDocumentPages()) {

int rotationCount = Collections.frequency(

wipDocumentPage.getPageActions(),

"rotate");

log.debug("going to rotate pages " + rotationCount);

if (rotationCount > 3) {

rotationCount -= 4;

}

if (rotationCount == 1) {

pageCollection.get_Item(wipDocumentPage.getPageNumber())

.setRotate(com.aspose.pdf.Rotation.

on90);

}

if (rotationCount == 2) {

pageCollection.get_Item(wipDocumentPage.getPageNumber())

.setRotate(com.aspose.pdf.Rotation.

on180);

}

if (rotationCount == 3) {

pageCollection.get_Item(wipDocumentPage.getPageNumber())

.setRotate(com.aspose.pdf.Rotation.

on270);

}

}

I am attaching the test file.

Can you please help.

Hi Sarika,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for Java 9.0.0, We have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWJAVA-34153 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,