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

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

Inheritance diagram for iText.Html2pdf.Attach.Impl.LinkContext:
iText.Html2pdf.Attach.IDocumentTreeJob

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 Deprecated in favor of Process(iText.StyledXmlParser.Node.INode, int) More...
 
virtual void  Process (INode node, int level)
  Check if an element is a link. 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

◆ Process()

virtual void iText.Html2pdf.Attach.Impl.LinkContext.Process ( INode  node,
int  level 
)
inlinevirtual

Check if an element is a link.

Parameters
node the node to process
level the hierarchical level of the node in the document tree structure

Implements iText.Html2pdf.Attach.IDocumentTreeJob.

◆ 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 Deprecated in favor of Process(iText.StyledXmlParser.Node.INode, int)

Parameters
root the DOM tree root node
Returns
this LinkContext