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.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFNet.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 |
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
Overrides
~Line()
Declaration
protected ~Line()
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 |
---|---|
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).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetLeaderLineLength()
Gets the leader line length of a line. *
Declaration
public double GetLeaderLineLength()
Returns
Type | Description |
---|---|
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 |
---|---|
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 |
---|---|
bool | 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 |
---|---|
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 |
---|---|
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(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 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetEndStyle(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(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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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(bool)
Sets the option of whether to show caption.
Declaration
public void SetShowCaption(bool showCaption)
Parameters
Type | Name | Description |
---|---|---|
bool | 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(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 |
---|---|---|
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 |
---|---|---|
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 |