Class DefaultTagWorkerFactory

java.lang.Object
com.itextpdf.html2pdf.attach.impl.DefaultTagWorkerFactory
All Implemented Interfaces:
ITagWorkerFactory

public class DefaultTagWorkerFactory extends Object implements ITagWorkerFactory
The default implementation of a tag worker factory, mapping tags to tag worker implementations.
  • Constructor Details

    • DefaultTagWorkerFactory

      public DefaultTagWorkerFactory()
      Instantiates a new default tag worker factory.
  • Method Details

    • getInstance

      public static ITagWorkerFactory getInstance()
      Gets ITagWorkerFactory instance.
      Returns:
      default instance that is used if custom tag workers are not configured
    • getTagWorker

      public final ITagWorker getTagWorker (com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context)
      Specified by:
      getTagWorker in interface ITagWorkerFactory
      Parameters:
      tag - IElementNode
      context - ProcessorContext
      Returns:
      a ITagWorker instance constructed based on the passed parameters.
    • getCustomTagWorker

      public ITagWorker getCustomTagWorker (com.itextpdf.styledxmlparser.node.IElementNode tag, ProcessorContext context)
      This is a hook method. Users wanting to provide a custom mapping or introduce their own ITagWorkers should implement this method.
      Parameters:
      tag - the tag
      context - the context
      Returns:
      the custom tag worker