iText 8.0.2 API
iText.Layout.Element.Link Class Reference

A clickable piece of Text which contains a link annotation dictionary. More...

Inheritance diagram for iText.Layout.Element.Link:
iText.Layout.Element.Text iText.Layout.Element.AbstractElement< iText.Layout.Element.Text > iText.Layout.Element.ILeafElement iText.Layout.Tagging.IAccessibleElement iText.Layout.Element.IElement iText.Layout.IPropertyContainer

Public Member Functions

  Link (String text, PdfLinkAnnotation linkAnnotation)
  Creates a Link with a fully constructed link annotation dictionary. More...
 
  Link (String text, PdfAction action)
  Creates a Link which can execute an action. More...
 
  Link (String text, PdfDestination destination)
  Creates a Link to another location in the document. More...
 
virtual PdfLinkAnnotation  GetLinkAnnotation ()
  Gets the link annotation dictionary associated with this link. More...
 
override AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 
- Public Member Functions inherited from iText.Layout.Element.Text
  Text (String text)
  Constructs a Text with its role initialized. More...
 
virtual String  GetText ()
  Gets the contents of the Text object that will be rendered. More...
 
virtual void  SetText (String text)
  Sets the contents of the Text object. More...
 
virtual float  GetTextRise ()
  Gets the text rise. More...
 
virtual iText.Layout.Element.Text  SetTextRise (float textRise)
  Sets the text rise. More...
 
virtual ? float  GetHorizontalScaling ()
  Gets the horizontal scaling property, which determines how wide the text should be stretched. More...
 
virtual iText.Layout.Element.Text  SetSkew (float alpha, float beta)
  Skews the text to simulate italic and other effects. More...
 
virtual iText.Layout.Element.Text  SetHorizontalScaling (float horizontalScaling)
  The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. More...
 
virtual iText.Layout.Element.Text  SetNeutralRole ()
  Give this element a neutral role. More...
 
- Public Member Functions inherited from iText.Layout.Element.AbstractElement< iText.Layout.Element.Text >
virtual IRenderer  GetRenderer ()
  Gets a renderer for this element. More...
 
virtual void  SetNextRenderer (IRenderer renderer)
  Overrides the iText.Layout.Renderer.IRenderer instance which will be returned by the next call to the GetRenderer(). More...
 
virtual IRenderer  CreateRendererSubTree ()
  Creates a renderer subtree with root in the current element. More...
 
override bool  HasProperty (int property)
  Checks if this entity has the specified property. More...
 
override T1  GetProperty< T1 > (int property)
  Gets the property from this entity. More...
 
virtual T  AddStyle (Style style)
  Add a new style to this element. More...
 
virtual IList< IElement GetChildren ()
  Gets the child elements of this elements More...
 
virtual bool  IsEmpty ()
  Returns true if this list contains no elements. More...
 
virtual T  SetAction (PdfAction action)
  Sets an action on this Element. More...
 
virtual T  SetPageNumber (int pageNumber)
  Explicitly sets the page number this element should be put on. More...
 
- Public Member Functions inherited from iText.Layout.Element.IElement
void  SetNextRenderer (IRenderer renderer)
  Overrides the iText.Layout.Renderer.IRenderer instance which will be returned by the next call to the GetRenderer(). More...
 
IRenderer  GetRenderer ()
  Gets a renderer for this element. More...
 
IRenderer  CreateRendererSubTree ()
  Creates a renderer subtree with root in the current element. More...
 
- Public Member Functions inherited from iText.Layout.IPropertyContainer
bool  HasProperty (int property)
  Checks if this entity has the specified property. More...
 
bool  HasOwnProperty (int property)
  Checks if this entity has the specified property, i.e. if it was set to this very element earlier More...
 
T1  GetProperty< T1 > (int property)
  Gets the property from this entity. More...
 
T1  GetOwnProperty< T1 > (int property)
  Gets own property from this entity. More...
 
T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
void  SetProperty (int property, Object value)
  Sets a property for this entity. More...
 
void  DeleteOwnProperty (int property)
  Deletes the own property of this entity. More...
 

Detailed Description

A clickable piece of Text which contains a link annotation dictionary.

A clickable piece of Text which contains a link annotation dictionary . The concept is largely similar to that of the HTML anchor tag.

Constructor & Destructor Documentation

◆ Link() [1/3]

iText.Layout.Element.Link.Link ( String  text,
PdfLinkAnnotation  linkAnnotation 
)
inline

Creates a Link with a fully constructed link annotation dictionary.

Parameters
text the textual contents of the link
linkAnnotation a iText.Kernel.Pdf.Annot.PdfLinkAnnotation

◆ Link() [2/3]

iText.Layout.Element.Link.Link ( String  text,
PdfAction  action 
)
inline

Creates a Link which can execute an action.

Parameters
text the textual contents of the link
action a iText.Kernel.Pdf.Action.PdfAction

◆ Link() [3/3]

iText.Layout.Element.Link.Link ( String  text,
PdfDestination  destination 
)
inline

Creates a Link to another location in the document.

Parameters
text the textual contents of the link
destination a iText.Kernel.Pdf.Navigation.PdfDestination

Member Function Documentation

◆ GetAccessibilityProperties()

override AccessibilityProperties iText.Layout.Element.Link.GetAccessibilityProperties ( )
inlinevirtual

Gets the accessibility properties.

Gets the accessibility properties . See also IAccessibleElement.

Returns
an interface that allows to specify properties of a tagged element in Tagged PDF.

Reimplemented from iText.Layout.Element.Text.

◆ GetLinkAnnotation()

virtual PdfLinkAnnotation iText.Layout.Element.Link.GetLinkAnnotation ( )
inlinevirtual

Gets the link annotation dictionary associated with this link.

Returns
a iText.Kernel.Pdf.Annot.PdfLinkAnnotation