image.png (2.2 KB)
用的就是官方mode代码,然后显示应该是pdf批注文本,加个指向问题的引线箭头,现在是文本框把整个引线都圈起来了:
var da = new Aspose.Pdf.Annotations.DefaultAppearance();
da.TextColor = System.Drawing.Color.Red;
da.FontSize = 10;
var fta = new Aspose.Pdf.Annotations.FreeTextAnnotation(page, new Aspose.Pdf.Rectangle(422.25, 645.75, 583.5, 702.75), da);
fta.Intent = Aspose.Pdf.Annotations.FreeTextIntent.FreeTextCallout;
fta.EndingStyle = Aspose.Pdf.Annotations.LineEnding.OpenArrow;
fta.Callout = new Aspose.Pdf.Point[]
{
new Aspose.Pdf.Point(428.25, 651.75),
new Aspose.Pdf.Point(462.75, 681.375),
new Aspose.Pdf.Point(474, 681.375)
};
// Add the annotation to the page
page.Annotations.Add(fta);
// Set rich text for the annotation
fta.RichText = "<body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acrobat:11.0.23\" xfa:spec=\"2.0.2\" style=\"color:#FF0000;font-weight:normal;font-style:normal;font-stretch:normal\"><p dir=\"ltr\"><span style=\"font-size:9.0pt;font-family:Helvetica\">This is a sample</span></p></body>";