Show / Hide Table of Contents

Class Line

The purpose of a line annotation (PDF 1.3) is to display a single straight line on the page. When opened, it shall display a pop-up window containing the text of the associated note.

Inheritance
System.Object
Annot
Markup
Line
PolyLine
Implements
System.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, Int32)
Markup.GetContentRect()
Markup.SetContentRect(Rect)
Markup.GetPadding()
Markup.SetPadding(Rect)
Markup.RotateAppearance(Double)
Annot.Dispose()
Annot.Dispose(Boolean)
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, Boolean)
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, Int32)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(Int32)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(Int32)
Annot.RefreshAppearance()
Annot.GetCustomData(String)
Annot.SetCustomData(String, String)
Annot.DeleteCustomData(String)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF.Annots
Assembly: PDFNetAndroid.dll
Syntax
public class Line : Markup, IDisposable

Constructors

Line(Annot)

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

Declaration
public Line(Annot ann)
Parameters
Type Name Description
Annot ann

the d

Remarks

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

Line(Obj)

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

Declaration
public Line(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 Line annotation, in the specified document.

Declaration
public static Line Create(SDFDoc doc, Rect pos)
Parameters
Type Name Description
SDFDoc doc

A document to which the annotation is added.

Rect pos

A rectangle specifying the annotation's bounds, specified in user space coordinates.

Returns
Type Description
Line

A newly created blank Line annotation.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Finalize()

Releases all resources used by the Line

Declaration
protected void Finalize()

GetCaptionPosition()

Gets the caption position of a line.

Declaration
public Line.CapPos GetCaptionPosition()
Returns
Type Description
Line.CapPos

A cap position value from the "CapPos" enum.

Remarks

Caption position describs the annotation�s caption positioning. Valid values are e_Inline, meaning the caption shall be centered inside the line, and e_Top, meaning the caption shall be on top of the line. Default value: Inline

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetEndPoint()

Gets the coordinates of the end of a line.

Declaration
public Point GetEndPoint()
Returns
Type Description
Point

A Point struct, whose x entry specifies the x coordinate of the end of the line and the y entry specifies the y coordinate of the end of the line.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetEndStyle()

Gets the ending syle of the end of a line.

Declaration
public Line.EndingStyle GetEndStyle()
Returns
Type Description
Line.EndingStyle

A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style of the start point.

Remarks

Default value: e_None.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetIntentType()

Gets the intent type of the line.

Declaration
public Line.IntentType GetIntentType()
Returns
Type Description
Line.IntentType

An intent type value from the "IntentType" enum.

Remarks

Intent type describes the intent of the line annotation. Valid values shall be "e_LineArrow", which means that the annotation is intended to function as an arrow, and "e_LineDimension", which means that the annotation is intended to function as a dimension line.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetLeaderLineExtensionLength()

Gets the leader line extension length of a line.

Declaration
public double GetLeaderLineExtensionLength()
Returns
Type Description
System.Double

A number denoting the length of the leader line extension in px.

Remarks

Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetLeaderLineLength()

Gets the leader line length of a line. *

Declaration
public double GetLeaderLineLength()
Returns
Type Description
System.Double

A number denoting the length of the leader line in px.

Remarks

usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetLeaderLineOffset()

Gets the leader line offset length of a line.

Declaration
public double GetLeaderLineOffset()
Returns
Type Description
System.Double

A number denoting the length of the leader line offset in px.

Remarks

usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetShowCaption()

Gets the option of whether to show caption.

Declaration
public bool GetShowCaption()
Returns
Type Description
System.Boolean

A boolean value indicating whether the caption will be shown.

Remarks

If true, the text specified by the Contents or RCentries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetStartPoint()

Gets the coordinates of the start of a line.

Declaration
public Point GetStartPoint()
Returns
Type Description
Point

A Point struct, whose x entry specifies the x coordinate of the start of the line and the y entry specifies the y coordinate of the start of the line.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetStartStyle()

Gets the ending syle of the start of a line.

Declaration
public Line.EndingStyle GetStartStyle()
Returns
Type Description
Line.EndingStyle

A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style of the start point.

Remarks

Default value: e_None.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetTextHOffset()

Gets the horizontal offset of the caption.

Declaration
public double GetTextHOffset()
Returns
Type Description
System.Double

A number denoting the horizontal offset of caption in px.

Remarks

The horizontal offset specifies the offset of the caption text from its normal position. Specifially the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetTextVOffset()

Gets the vertical offset of the caption.

Declaration
public double GetTextVOffset()
Returns
Type Description
System.Double

A number denoting the vertical offset of caption in px.

Remarks

The vertical offset specifies the offset of the caption text from its normal position. Specifially the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0(no offset from normal vertical positioning).

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetCaptionPosition(Line.CapPos)

Sets the caption position of a line. (PDF 1.7)

Declaration
public void SetCaptionPosition(Line.CapPos style)
Parameters
Type Name Description
Line.CapPos style

A cap position value from the "CapPos" enum.

Remarks

Caption position describs the annotation�s caption positioning. Valid values are e_Inline, meaning the caption shall be centered inside the line, and e_Top, meaning the caption shall be on top of the line. Default value: Inline.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetEndPoint(Point)

Sets the coordinates of the end of a line.

Declaration
public void SetEndPoint(Point ep)
Parameters
Type Name Description
Point ep
  • A Point struct whose x entry is going to be set as the x coordinate of the end point of the line, whose y entry is going to be set as the y coordinate of the end point of the line.
Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetEndStyle(Line.EndingStyle)

Sets the ending syle of the end of a line (Optional; PDF�1.4)

Declaration
public void SetEndStyle(Line.EndingStyle est)
Parameters
Type Name Description
Line.EndingStyle est

A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style of the start point.

Remarks

Default value: e_None.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetIntentType(Line.IntentType)

Sets the intent type of the line. (For PDF 1.6)

Declaration
public void SetIntentType(Line.IntentType style)
Parameters
Type Name Description
Line.IntentType style

An intent type value from the "IntentType" enum.

Remarks

Intent type describes the intent of the line annotation. Valid values shall be "e_LineArrow", which means that the annotation is intended to function as an arrow, and "e_LineDimension", which means that the annotation is intended to function as a dimension line.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetLeaderLineExtensionLength(Double)

Sets the leader line extension length of a line. (PDF 1.6)

Declaration
public void SetLeaderLineExtensionLength(double ll)
Parameters
Type Name Description
System.Double ll

the new leader line extension length

Remarks

Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetLeaderLineLength(Double)

Sets the leader line length of a line. (PDF 1.6)

Declaration
public void SetLeaderLineLength(double ll)
Parameters
Type Name Description
System.Double ll

the new leader line length

Remarks

Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetLeaderLineOffset(Double)

Sets the leader line offset length of a line. (PDF 1.7)

Declaration
public void SetLeaderLineOffset(double ll)
Parameters
Type Name Description
System.Double ll

A number denoting the length of the leader line offset in px.

Remarks

Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry). Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetShowCaption(Boolean)

Sets the option of whether to show caption.

Declaration
public void SetShowCaption(bool showCaption)
Parameters
Type Name Description
System.Boolean showCaption

A boolean value indicating whether the caption will be shown.

Remarks

If true, the text specified by the Contents or RCentries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetStartPoint(Point)

Sets the coordinates of the start of a line.

Declaration
public void SetStartPoint(Point sp)
Parameters
Type Name Description
Point sp

A Point struct whose x entry is going to be set as the x coordinate of the start point of the line, whose y entry is going to be set as the y coordinate of the start point of the line.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetStartStyle(Line.EndingStyle)

Sets the ending syle of the start of a line (Optional; PDF�1.4.)

Declaration
public void SetStartStyle(Line.EndingStyle sst)
Parameters
Type Name Description
Line.EndingStyle sst

A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style of the start point.

Remarks

Default value: e_None.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetTextHOffset(Double)

Sets the horizontal offset of the caption. (For PDF 1.7 )

Declaration
public void SetTextHOffset(double offset)
Parameters
Type Name Description
System.Double offset

A umber denoting the horizontal offset of caption in px.

Remarks

The horizontal offset specifies the offset of the caption text from its normal position. Specifially the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning)

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetTextVOffset(Double)

Sets the vertical offset of the caption. (For PDF 1.7 )

Declaration
public void SetTextVOffset(double offset)
Parameters
Type Name Description
System.Double offset

A number denoting the vertical offset of caption in px.

Remarks

The vertical offset specifies the offset of the caption text from its normal position. Specifially the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0(no offset from normal vertical positioning).

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX