| FreeTextCreate Method |
Create a free-text annotation.
The returned free-text annotation is not yet part of any page.
It can be added to a page's list of annotations.
Namespace: PdfTools.Toolbox.Pdf.AnnotationsAssembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.2.0+708f7116d933787a0712d56133e4c2c9bf21e5e3
Syntax public static FreeText Create(
Document targetDocument,
Rectangle boundingBox,
string content,
Paint paint,
Stroke stroke = null
)
Parameters
- targetDocument Document
-
The output document with which the returned object is associated.
- boundingBox Rectangle
-
The location on the page.
- content String
-
The text content.
- paint Paint
-
This paint used for the background of the free text annotation.
If , the background is transparent.
- stroke Stroke (Optional)
-
The stroking parameters used for stroking the rectangle.
The stroking paint is used as the annotation's main paint.
Return Value
FreeText
The newly created free text annotation.
Exceptions Exception | Condition |
---|
ArgumentException | if the targetDocument has already been closed |
ArgumentException | if the targetDocument is read-only |
ArgumentException | if the paint has a ColorSpace other than a device color space |
ArgumentException | if the paint has a non-Transparency with BlendMode other than Normal |
ArgumentException | if the paint argument is not associated with the targetDocument |
ArgumentException | if the stroke's Paint has a ColorSpace other than a device color space |
ArgumentException | if the stroke's Paint has a non-Transparency with BlendMode other than Normal |
ArgumentException | if the stroke's LineCapStyle is other than Butt |
ArgumentException | if the stroke's LineJoinStyle is other than Miter |
ArgumentException | if the stroke's MiterLimit is other than 10 |
ArgumentException | if the stroke's DashPhase is other than 0 |
ArgumentNullException | if targetDocument is . |
See Also