Class SAXmyHtmlHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class SAXmyHtmlHandler
    extends SAXiTextHandler<HtmlPeer>
    The Tags-class maps several XHTML-tags to iText-objects.
    • Field Detail

      • bodyAttributes

        private java.util.Properties bodyAttributes
        These are the properties of the body section.
      • tableBorder

        private boolean tableBorder
        This is the status of the table border.
    • Constructor Detail

      • SAXmyHtmlHandler

        public SAXmyHtmlHandler​(DocListener document)
        Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on the Document-object.
        Parameters:
        document - this is the document on which events must be triggered
      • SAXmyHtmlHandler

        public SAXmyHtmlHandler​(DocListener document,
                                HtmlTagMap htmlTags)
        Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on the Document-object.
        Parameters:
        document - this is the document on which events must be triggered
        htmlTags - a tagmap translating HTML tags to iText tags
      • SAXmyHtmlHandler

        public SAXmyHtmlHandler​(DocListener document,
                                BaseFont bf)
        Constructs a new SAXiTextHandler that will translate all the events triggered by the parser to actions on the Document-object.
        Parameters:
        document - this is the document on which events must be triggered
        bf - the base class for the supported fonts
    • Method Detail

      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String name,
                                 org.xml.sax.Attributes attrs)
        This method gets called when a start tag is encountered.
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class SAXiTextHandler<HtmlPeer>
        Parameters:
        uri - the Uniform Resource Identifier
        localName - the local name (without prefix), or the empty string if Namespace processing is not being performed.
        name - the name of the tag that is encountered
        attrs - the list of attributes
      • endElement

        public void endElement​(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String name)
        This method gets called when an end tag is encountered.
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class SAXiTextHandler<HtmlPeer>
        Parameters:
        uri - the Uniform Resource Identifier
        localName - the local name (without prefix), or the empty string if Namespace processing is not being performed.
        name - the name of the tag that ends