Show / Hide Table of Contents

# Class Ink

An ink annotation (PDF 1.3) represents a freehand "scribble" composed of one or more disjoint paths. When opened, it shall display a pop-up window containing the text of the associated note.

##### Inheritance

object
Annot
Markup
Ink

##### Implements

IDisposable

##### Inherited Members

Markup.GetTitle()
Markup.SetTitle(string)
Markup.GetPopup()
Markup.SetPopup(Popup)
Markup.GetOpacity()
Markup.SetOpacity(double)
Markup.GetSubject()
Markup.SetSubject(string)
Markup.GetCreationDates()
Markup.SetCreationDates(Date)
Markup.GetBorderEffect()
Markup.SetBorderEffect(Markup.BorderEffect)
Markup.GetBorderEffectIntensity()
Markup.SetBorderEffectIntensity(double)
Markup.GetInteriorColor()
Markup.GetInteriorColorCompNum()
Markup.SetInteriorColor(ColorPt, int)
Markup.GetContentRect()
Markup.SetContentRect(Rect)
Markup.GetPadding()
Markup.SetPadding(Rect)
Markup.RotateAppearance(double)
Annot.Dispose()
Annot.Dispose(bool)
Annot.GetHandleInternal()
Annot.GetRefHandleInternal()
Annot.CreateInternal(IntPtr, object)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(string)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(string)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, bool)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance()
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance(Annot.AnnotationState, string)
Annot.SetAppearance(Obj)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj, Annot.AnnotationState, string)
Annot.RemoveAppearance()
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance(Annot.AnnotationState, string)
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(string)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt, int)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(int)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(int)
Annot.RefreshAppearance()
Annot.GetCustomData(string)
Annot.SetCustomData(string, string)
Annot.DeleteCustomData(string)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF.Annots

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class Ink : Markup, IDisposable

### Constructors

#### Ink(Annot)

Creates an Ink annotation and initialize it using given annotation object.

##### Declaration

    public Ink(Annot ann)

##### Parameters

Type | Name | Description
--- | --- | ---
Annot | ann | the annot

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Ink(Obj)

Creates an Ink annotation and initialize it using given Cos/SDF object.

##### Declaration

    public Ink(Obj d)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | d | the d

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

### Methods

#### Create(SDFDoc, Rect)

Creates a new Ink annotation, in the specified document.

##### Declaration

    public static Ink Create(SDFDoc doc, Rect pos)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the Ink annotation is added.
Rect | pos | A rectangle specifying the Ink annotation's bounds, specified in user space coordinates.

##### Returns

Type | Description
--- | ---
Ink | A newly created blank Ink annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Erase(Point, Point, double)

Erase a rectangle area formed by pt1pt2 with width

##### Declaration

    public bool Erase(Point pt1, Point pt2, double eraserHalfWidth)

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt1 | A point object that is one end of the eraser segment.
Point | pt2 | A point object that is the other end of the eraser segment.
double | eraserHalfWidth | The half width of the eraser.

##### Returns

Type | Description
--- | ---
bool | Whether an ink stroke was erased.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### ~Ink()

Releases all resources used by the Ink

##### Declaration

    protected ~Ink()

#### GetHighlightIntent()

Retrieves whether the Ink will draw like a highlighter.

##### Declaration

    public bool GetHighlightIntent()

##### Returns

Type | Description
--- | ---
bool | true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)

#### GetPathCount()

Gets number of stroked pathes in the InkList.

##### Declaration

    public int GetPathCount()

##### Returns

Type | Description
--- | ---
int | An integer representing the number of pathes in the Ink list.

##### Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetPoint(int, int)

Gets the specific point in the Ink List.

##### Declaration

    public Point GetPoint(int pathindex, int pointindex)

##### Parameters

Type | Name | Description
--- | --- | ---
int | pathindex | An unsigned integer indicating the index of the stroked path
int | pointindex | An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".

##### Returns

Type | Description
--- | ---
Point | A Point object that is located by "pathindex" and "pointindex".

##### Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetPointCount(int)

Gets number of points in a certain stroked path in the InkList.

##### Declaration

    public int GetPointCount(int pathindex)

##### Parameters

Type | Name | Description
--- | --- | ---
int | pathindex | An unsigned integer indicating the index of the stroked path, the number of points within whom is of our interest.

##### Returns

Type | Description
--- | ---
int | An integer representing the number of points in the stroked path of the Ink list.

##### Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetHighlightIntent(bool)

Enables or disables the Ink drawing like a highlighter.

##### Declaration

    public void SetHighlightIntent(bool highlight)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | highlight | true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)

#### SetPoint(int, int, Point)

Sets the specific point in the Ink List.

##### Declaration

    public void SetPoint(int pathindex, int pointindex, Point pt)

##### Parameters

Type | Name | Description
--- | --- | ---
int | pathindex | An unsigned integer indicating the index of the stroked path
int | pointindex | An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".
Point | pt | A Point object that is to be located by "pathindex" and "pointindex".

##### Remarks

The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

### Implements

IDisposable