←选择平台

PDFTextAnnotation类

总结
包含一个PDF文本注释信息。
语法
c#
VB
c++
Java
[SerializableAttribute ()]公共PDFTextAnnotation:PDFAnnotation
< SerializableAttribute () >公共PDFTextAnnotation继承了PDFAnnotation
公共PDFTextAnnotation扩展PDFAnnotation
[SerializableAttribute ()]公共ref类PDFTextAnnotation:公共PDFAnnotation
讲话

PDFTextAnnotation类包含一个PDF文本注释信息。

例子
c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.Pdf;使用Leadtools.WinForms;使用Leadtools.Drawing;公共无效PDFTextAnnotationExample (){字符串pdfSrcFileName = Path.Combine (LEAD_VARS.ImagesDir,@“Leadtools.pdf”);字符串pdfDestFileName = Path.Combine (LEAD_VARS.ImagesDir,@“LEAD_Annotations.pdf”);PDFFile PDFFile =PDFFile (pdfSrcFileName);= < PDFAnnotation >注释列表列表< PDFAnnotation > ();PDFTextAnnotation文本=PDFTextAnnotation ();PDFPen笔=PDFPen ();PDFBrush刷=PDFBrush ();/ /分配笔属性/ /创建冲红笔的宽度2钢笔。颜色= RasterColor.FromKnownColor (RasterKnownColor.Red);钢笔。PenStyle = PDFPen.Dashed;钢笔。宽度= 2;/ /分配刷属性/ /创建绿色固体刷刷子。BrushStyle = PDFBrush.Solid;刷子。颜色= RasterColor.FromKnownColor (RasterKnownColor.Green);文本。FramePen =笔;文本。FrameBrush =刷;文本。FontHeight = 30;文本。颜色= RasterColor.FromKnownColor (RasterKnownColor.Magenta);文本。字体名=“天线”;文本。内容=“这是注释文本”;文本。理由= PDFTextJustification.Left;文本。FrameBounds =PDFRect (200, 500, 500, 300);Annotations.Add(文本);pdfFile。WriteAnnotations(注释,pdfDestFileName);}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools.Codecs进口Leadtools.Pdf进口Leadtools.WinForms进口Leadtools.Drawing公共PDFTextAnnotationExample ()昏暗的pdfSrcFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“Leadtools.pdf”)昏暗的pdfDestFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“LEAD_Annotations.pdf”)昏暗的pdfFile作为PDFFile =PDFFile (pdfSrcFileName)昏暗的注释作为列表(PDFAnnotation) =PDFAnnotation列表()()昏暗的文本作为PDFTextAnnotation =PDFTextAnnotation ()昏暗的作为PDFPen =PDFPen ()昏暗的作为PDFBrush =PDFBrush ()“分配笔属性“创建冲红笔的宽度2钢笔。颜色= RasterColor.FromKnownColor (RasterKnownColor.Red)钢笔。PenStyle = PDFPen.Dashed钢笔。宽度= 2“分配刷属性“创建绿色固体刷刷子。BrushStyle = PDFBrush.Solid刷子。颜色= RasterColor.FromKnownColor (RasterKnownColor.Green)文本。FramePen =笔文本。FrameBrush =刷文本。FontHeight = 30文本。颜色= RasterColor.FromKnownColor (RasterKnownColor.Magenta)文本。字体名=“天线”文本。内容=“这是注释文本”文本。理由= PDFTextJustification.Left文本。FrameBounds =PDFRect (200、500、500、300)Annotations.Add(文本)pdfFile。pdfDestFileName WriteAnnotations(注释)结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

Leadtools.Pdf作为sembly
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。