GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfPencilMarkAnnotation Class

    Namespace:
    GemBox.Pdf.Annotations
    Assembly:
    GemBox.Pdf.dll

    An ink annotation (PDF 1.3) represents a freehand "scribble" composed of one or more disjoint paths.

    • C#
    • VB.NET
    public sealed class PdfPencilMarkAnnotation : PdfMarkupAnnotation
    Public NotInheritable Class PdfPencilMarkAnnotation
        Inherits PdfMarkupAnnotation
    Inheritance:
    System.Object
    PdfObject
    PdfAnnotation
    PdfMarkupAnnotation
    PdfPencilMarkAnnotation

    Properties

    AnnotationType

    Gets the Ink value.

    • C#
    • VB.NET
    public override PdfAnnotationType AnnotationType { get; }
    Public Overrides ReadOnly Property AnnotationType As PdfAnnotationType
    Property Value
    PdfAnnotationType

    The Ink value.

    Overrides
    PdfAnnotation.AnnotationType

    Appearance

    Gets the appearance settings for this PdfPencilMarkAnnotation.

    • C#
    • VB.NET
    public PdfPencilMarkAppearance Appearance { get; }
    Public ReadOnly Property Appearance As PdfPencilMarkAppearance
    Property Value
    PdfPencilMarkAppearance

    The appearance settings for this PdfPencilMarkAnnotation.

    Subpaths

    Gets the subpaths that this PdfPencilMarkAnnotation is made up of.

    • C#
    • VB.NET
    public PdfSubpathCollection Subpaths { get; }
    Public ReadOnly Property Subpaths As PdfSubpathCollection
    Property Value
    PdfSubpathCollection

    The subpaths that this PdfPencilMarkAnnotation is made up of.

    Methods

    ArcTo(PdfSize, PdfPoint, Boolean, Boolean, Double)

    Adds a elliptic arc to the end of the Segments of the last PdfSubpath in the Subpaths.

    note

    PDF doesn't natively support elliptic arcs so the arc is approximated with one to four Bézier curves.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation ArcTo(PdfSize radius, PdfPoint endPoint, bool isSweepDirectionClockwise = false, bool isLargeArc = false, double rotationAngle = 0)
    Public Function ArcTo(radius As PdfSize, endPoint As PdfPoint, isSweepDirectionClockwise As Boolean = False, isLargeArc As Boolean = False, rotationAngle As Double = 0) As PdfPencilMarkAnnotation
    Parameters
    radius
    PdfSize

    The radii (half the width and half the height) of an oval whose perimeter is used to draw the angle.

    endPoint
    PdfPoint

    The destination point for the end of the arc.

    isSweepDirectionClockwise
    System.Boolean

    A value that indicates whether the arc is drawn in the clockwise (positive-angle) or counter clockwise (negative-angle) direction.

    isLargeArc
    System.Boolean

    true to draw the arc greater than 180 degrees; otherwise, false.

    rotationAngle
    System.Double

    The rotation angle of the oval that specifies the curve. The curvature of the arc can be rotated with this parameter.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    ArcTo(Double, Double, Double, Double, Boolean, Boolean, Double)

    Adds a elliptic arc to the end of the Segments of the last PdfSubpath in the Subpaths.

    note

    PDF doesn't natively support elliptic arcs so the arc is approximated with one to four Bézier curves.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation ArcTo(double radiusX, double radiusY, double endPointX, double endPointY, bool isSweepDirectionClockwise = false, bool isLargeArc = false, double rotationAngle = 0)
    Public Function ArcTo(radiusX As Double, radiusY As Double, endPointX As Double, endPointY As Double, isSweepDirectionClockwise As Boolean = False, isLargeArc As Boolean = False, rotationAngle As Double = 0) As PdfPencilMarkAnnotation
    Parameters
    radiusX
    System.Double

    The horizontal radius of an oval whose perimeter is used to draw the angle.

    radiusY
    System.Double

    The vertical radius of an oval whose perimeter is used to draw the angle.

    endPointX
    System.Double

    The X-coordinate value of the destination point for the end of the arc.

    endPointY
    System.Double

    The Y-coordinate value of the destination point for the end of the arc.

    isSweepDirectionClockwise
    System.Boolean

    A value that indicates whether the arc is drawn in the clockwise (positive-angle) or counter clockwise (negative-angle) direction.

    isLargeArc
    System.Boolean

    true to draw the arc greater than 180 degrees; otherwise, false.

    rotationAngle
    System.Double

    The rotation angle of the oval that specifies the curve. The curvature of the arc can be rotated with this parameter.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.ArgumentException

    radiusX, radiusY, endPointX, or endPointY is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.ArgumentOutOfRangeException

    radiusX or radiusY is less than zero.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    BeginSubpath(PdfPoint)

    Begin a new subpath.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation BeginSubpath(PdfPoint startPoint)
    Public Function BeginSubpath(startPoint As PdfPoint) As PdfPencilMarkAnnotation
    Parameters
    startPoint
    PdfPoint

    The PdfPoint where the PdfSubpath begins.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'

    BeginSubpath(Double, Double)

    Begin a new subpath.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation BeginSubpath(double startPointX, double startPointY)
    Public Function BeginSubpath(startPointX As Double, startPointY As Double) As PdfPencilMarkAnnotation
    Parameters
    startPointX
    System.Double

    The X-coordinate value of PdfPoint where the PdfSubpath begins.

    startPointY
    System.Double

    The Y-coordinate value of PdfPoint where the PdfSubpath begins.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.ArgumentException

    startPointX or startPointY is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'

    BezierTo(PdfPoint, PdfPoint, PdfPoint)

    Adds a cubic Bézier curve to the end of the Segments of the last PdfSubpath in the Subpaths.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation BezierTo(PdfPoint controlPoint1, PdfPoint controlPoint2, PdfPoint endPoint)
    Public Function BezierTo(controlPoint1 As PdfPoint, controlPoint2 As PdfPoint, endPoint As PdfPoint) As PdfPencilMarkAnnotation
    Parameters
    controlPoint1
    PdfPoint

    The first control point of the curved line segment.

    controlPoint2
    PdfPoint

    The second control point of the curved line segment.

    endPoint
    PdfPoint

    The end point of the curved line segment.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.InvalidOperationException

    The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    BezierTo(Double, Double, Double, Double, Double, Double)

    Adds a cubic Bézier curve to the end of the Segments of the last PdfSubpath in the Subpaths.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation BezierTo(double controlPoint1X, double controlPoint1Y, double controlPoint2X, double controlPoint2Y, double endPointX, double endPointY)
    Public Function BezierTo(controlPoint1X As Double, controlPoint1Y As Double, controlPoint2X As Double, controlPoint2Y As Double, endPointX As Double, endPointY As Double) As PdfPencilMarkAnnotation
    Parameters
    controlPoint1X
    System.Double

    The X-coordinate value of the first control point of the curved line segment.

    controlPoint1Y
    System.Double

    The Y-coordinate value of the first control point of the curved line segment.

    controlPoint2X
    System.Double

    The X-coordinate value of the second control point of the curved line segment.

    controlPoint2Y
    System.Double

    The Y-coordinate value of the second control point of the curved line segment.

    endPointX
    System.Double

    The X-coordinate value of the end point of the curved line segment.

    endPointY
    System.Double

    The Y-coordinate value of the end point of the curved line segment.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.ArgumentException

    controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, endPointX, or endPointY is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.InvalidOperationException

    The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    LineTo(PdfPoint)

    Adds a straight line to the end of the Segments of the last PdfSubpath in the Subpaths.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation LineTo(PdfPoint endPoint)
    Public Function LineTo(endPoint As PdfPoint) As PdfPencilMarkAnnotation
    Parameters
    endPoint
    PdfPoint

    The end point of the straight line segment.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.InvalidOperationException

    The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'

    LineTo(Double, Double)

    Adds a straight line to the end of the Segments of the last PdfSubpath in the Subpaths.

    • C#
    • VB.NET
    public PdfPencilMarkAnnotation LineTo(double endPointX, double endPointY)
    Public Function LineTo(endPointX As Double, endPointY As Double) As PdfPencilMarkAnnotation
    Parameters
    endPointX
    System.Double

    The X-coordinate value of the end point of the straight line segment.

    endPointY
    System.Double

    The Y-coordinate value of the end point of the straight line segment.

    Returns
    PdfPencilMarkAnnotation

    A reference to this instance after the operation has completed.

    Exceptions
    System.ArgumentException

    endPointX or endPointY is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.InvalidOperationException

    The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2 Path Construction Operators'

    Inherited Properties

    AssociatedFiles

    (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.

    (Inherited from PdfAnnotation)

    Author

    (Optional; PDF 1.1) The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.

    (Inherited from PdfMarkupAnnotation)

    Bounds

    (Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units.

    (Inherited from PdfAnnotation)

    InReplyTo

    (Required if a ReplyType entry is present, otherwise optional; PDF 1.5) A reference to the PdfMarkupAnnotation that this PdfMarkupAnnotation is "in reply to". Both PdfMarkupAnnotations shall be on the same page of the document. The relationship between the two PdfMarkupAnnotations shall be specified by the ReplyType entry.

    (Inherited from PdfMarkupAnnotation)

    Intent

    (Optional; PDF 1.6) A name describing the intent of the markup annotation. Intents allow conforming readers to distinguish between different uses and behaviors of a single markup annotation type.

    PdfFreeTextAnnotations (Table 174), line annotations (Table 175), polygon annotations (Table 178), and (PDF 1.7) polyline annotations (Table 178) have defined intents.

    (Inherited from PdfMarkupAnnotation)

    Locked

    (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

    (Inherited from PdfAnnotation)

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Page

    Gets the page with which this annotation is associated.

    (Inherited from PdfAnnotation)

    ReplyType

    (Optional; meaningful only if InReplyTo is present; PDF 1.6) A name specifying the relationship (the "reply type") between this PdfMarkupAnnotation and the one specified by the InReplyTo property.

    Default value: Reply.

    (Inherited from PdfMarkupAnnotation)

    Subject

    (Optional; PDF 1.5) Text representing a short description of the subject being addressed by the annotation.

    (Inherited from PdfMarkupAnnotation)

    Inherited Methods

    SetBounds(System.Double, System.Double)

    Sets the size of the Bounds.

    (Inherited from PdfAnnotation)

    SetBounds(System.Double, System.Double, System.Double, System.Double)

    Sets the Bounds.

    (Inherited from PdfAnnotation)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    See Also

    PDF Specification ISO 32000-1:2008, section '12.5.6.13 Ink Annotations'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.