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

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.

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

                    using (var outputStream = new MemoryStream())
                        returnValue = outputStream.ToArray();

image.png (27.6 KB)

Bishan M.


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.