I want to rotate FreeTextAnnotation but below code doesn’t work.
Please share some samples if you have.
thanks
freeText.TextRectangle.Rotate(Aspose.Pdf.Rotation.on270);
freeText.Rect.Rotate(Aspose.Pdf.Rotation.on270)
I want to rotate FreeTextAnnotation but below code doesn’t work.
Please share some samples if you have.
thanks
freeText.TextRectangle.Rotate(Aspose.Pdf.Rotation.on270);
freeText.Rect.Rotate(Aspose.Pdf.Rotation.on270)
@yeonkyu
try freeText.Rotate = Rotation.on270;
for document generated by the following code
var doc = new Aspose.Pdf.Document();
doc.Pages.Add();
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";
doc.Pages[1].Annotations.Add(freeText);
//freeText.TextRectangle.Rotate(Aspose.Pdf.Rotation.on270);
//freeText.Rect.Rotate(Aspose.Pdf.Rotation.on270)
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)