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

Free Support Forum - aspose.com

How to Rotate FreeTextAnnotation in Aspose.pdf.net

I want to rotate FreeTextAnnotation but below code doesn’t work.
Please share some samples if you have.


try freeText.Rotate = Rotation.on270;

for document generated by the following code

var doc = new Aspose.Pdf.Document();

new DefaultAppearance("Arial", 12, System.Drawing.Color.Black);

var freeText = new FreeTextAnnotation(doc.Pages[1], new Aspose.Pdf.Rectangle(20, 600, 150, 730), 
                                            new DefaultAppearance("Arial", 12, System.Drawing.Color.Black));
freeText.Border = new Border(freeText);
freeText.Color = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Transparent);

freeText.Title = "aaaa";
freeText.Subject = "xxxx";
freeText.Contents = "Hello World";

freeText.Rotate = Rotation.on270;

doc.Save(myDir + "RotateFreeText.pdf");

an annotation is created that looks normal when the document is opened and with rotated text after entering edit mode
RotatedFreeText.png (17.6 KB)