←Select platform

Pen Property

Summary
Pen of this annotation.
Syntax
C#
C++/CLI
Java
publicPDFPenPen {get;set; }
publicPDFPengetPen();publicvoidsetPen(PDFPenpDFPen);
public:propertyPDFPenPen {PDFPenget();voidset (PDFPen);}

Property Value

APDFPenthat represents the pen properties for this annotation.

Example
C#
usingLeadtools;usingLeadtools.Codecs;usingLeadtools.Pdf;usingLeadtools.WinForms;usingLeadtools.Drawing;publicvoidPDFPencilAnnotationExample(){stringpdfSrcFileName = Path.Combine(LEAD_VARS.ImagesDir,@"Leadtools.pdf");stringpdfDestFileName = Path.Combine(LEAD_VARS.ImagesDir,@"LEAD_Annotations.pdf");PDFFile pdfFile =newPDFFile(pdfSrcFileName);List Annotations =newList();PDFPencilAnnotation pencil =newPDFPencilAnnotation();List points =newList();PDFPen pen =newPDFPen();// Assign pen properties// Create dashed red pen with width of 2pen.Color = RasterColor.FromKnownColor(RasterKnownColor.Red);pen.PenStyle = PDFPen.Dashed;pen.Width = 2;pencil.Pen = pen;pencil.Points.Add(newPDFPoint(250, 400));pencil.Points.Add(newPDFPoint(300, 350));pencil.Points.Add(newPDFPoint(300, 200));pencil.Points.Add(newPDFPoint(300, 100));pencil.Points.Add(newPDFPoint(250, 150));pencil.Points.Add(newPDFPoint(100, 100));Annotations.Add(pencil);pdfFile.WriteAnnotations(Annotations, pdfDestFileName);}staticclassLEAD_VARS{publicconststringImagesDir =@“C: \ LEADTOOLS22 \ Resources \图片”;}
Requirements

目标平台

Leadtools.Pdf Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2023LEAD Technologies, Inc.All Rights Reserved.