| PolyLineAnnotationCreate Method |
Create a poly-line annotation.
The returned poly-line 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 PolyLineAnnotation Create(
Document targetDocument,
Path path,
Stroke stroke
)
Parameters
- targetDocument Document
-
The output document with which the returned object is associated.
- path Path
-
The path of the poly line.
- stroke Stroke
-
The stroking parameters used for stroking the poly-line.
The stroking paint is used as the annotation's main paint.
Return Value
PolyLineAnnotation
The newly created poly-line annotation.
Exceptions Exception | Condition |
---|
ArgumentException | if the targetDocument has already been closed |
ArgumentException | if the targetDocument is read-only |
ArgumentException | if the targetDocument's conformance is not PDF 2.0 and the path argument contains curve-to operations |
ArgumentException | if the path argument contains close-subpath or rectangle operations |
UnsupportedFeatureException | if the targetDocument's conformance is PDF 2.0 and the path argument contains curve-to operations |
ArgumentException | if the path argument has not been constructed with a PathGenerator |
ArgumentException | if the stroke 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 argument's LineCapStyle is other than Butt |
ArgumentException | if the stroke argument's LineJoinStyle is other than Miter |
ArgumentException | if the stroke argument's MiterLimit is other than 10 |
ArgumentException | if the stroke argument's DashPhase is other than 0 |
ConformanceException | if the explicitly requested PDF conformance is smaller than PDF 1.5 |
ArgumentNullException | if targetDocument is . |
ArgumentNullException | if path is . |
ArgumentNullException | if stroke is . |
See Also