We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Rotate Annotation in PDF using C# - StampAnnotation.Characteristics.Rotate does not work

Hello,
We’re facing an issue where StampAnnotation rotation is not respected when explicitly setting it to zero. The PDF document is scanned at 270 degrees. But we want the stamp annotation be added at rotation zero.

Code:
var stamp = new StampAnnotation(document.Pages[page], new Rectangle(llx, lly, urx, ury))
{
Image = svgMemoryStream
};
stamp.Characteristics.Rotate = Rotation.None;

                    document.Pages[page].Annotations.Add(stamp);
                    using (var outputStream = new MemoryStream())
                    {
                        document.Save(outputStream);
                        returnValue = outputStream.ToArray();
                        outputStream.Close();
                    }

image.png (27.6 KB)

Thanks,
Bishan M.

@ipipebmoteria

Can you please try to add the annotation while considering the page rotation as well like below:

document.Pages[page].Annotations.Add(stamp, true);

Also, please test the code with 21.10 version of the API. In case issue still persists, please share a sample PDF along with complete sample code snippet that we can use to test the scenario in our environment and address it accordingly.