| 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.3.0+2e7887cb8ae45c4d911ad975ad001ac2f1f257d8
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