pdfHTML 5.0.4 API
iText.Html2pdf.Attach.Impl.LinkContext Class Reference

This class keeps track of information regarding link (destinations) that occur in the document. More...

Public Member Functions

  LinkContext ()
  Construct an (empty) LinkContext More...
 
virtual iText.Html2pdf.Attach.Impl.LinkContext  ScanForIds (INode root)
  Scan the DOM tree for all (internal) link targets More...
 
virtual bool  IsUsedLinkDestination (String linkDestination)
  Returns whether a given (internal) link destination is used by at least one href element in the document More...
 
virtual void  AddLinkAnnotation (String id, PdfLinkAnnotation annot)
  Add link annotation to the context. More...
 
virtual PdfLinkAnnotation  GetLinkAnnotation (String id)
  Get link annotation. More...
 

Detailed Description

This class keeps track of information regarding link (destinations) that occur in the document.

This class keeps track of information regarding link (destinations) that occur in the document. Doing so enables us to drastically trim the amount of PdfDestinations that will end up being included in the document. For performance reasons it was decided to scan the DOM tree only once and store the result in a separate object (this object) in the ProcessorContext.

This class is not reusable and a new instance shall be created for every new conversion process.

Constructor & Destructor Documentation

◆ LinkContext()

iText.Html2pdf.Attach.Impl.LinkContext.LinkContext ( )
inline

Construct an (empty) LinkContext

Member Function Documentation

◆ AddLinkAnnotation()

virtual void iText.Html2pdf.Attach.Impl.LinkContext.AddLinkAnnotation ( String  id,
PdfLinkAnnotation  annot 
)
inlinevirtual

Add link annotation to the context.

Parameters
id link destination.
annot link annotation to store.

◆ GetLinkAnnotation()

virtual PdfLinkAnnotation iText.Html2pdf.Attach.Impl.LinkContext.GetLinkAnnotation ( String  id )
inlinevirtual

Get link annotation.

Parameters
id link destination.
Returns
link annotation for the given link destination.

◆ IsUsedLinkDestination()

virtual bool iText.Html2pdf.Attach.Impl.LinkContext.IsUsedLinkDestination ( String  linkDestination )
inlinevirtual

Returns whether a given (internal) link destination is used by at least one href element in the document

Parameters
linkDestination link destination
Returns
whether a given (internal) link destination is used by at least one href element in the document

◆ ScanForIds()

virtual iText.Html2pdf.Attach.Impl.LinkContext iText.Html2pdf.Attach.Impl.LinkContext.ScanForIds ( INode  root )
inlinevirtual

Scan the DOM tree for all (internal) link targets

Parameters
root the DOM tree root node
Returns
this LinkContext