示例#1
0
 /**
  * @see com.itextpdf.text.html.simpleparser.HTMLTagProcessors#endElement(com.itextpdf.text.html.simpleparser.HTMLWorker, java.lang.String)
  */
 public void EndElement(HTMLWorker worker, String tag)
 {
     worker.CarriageReturn();
     worker.SetPendingTD(false);
     worker.UpdateChain(HtmlTags.TD);
     worker.SetSkipText(true);
 }
示例#2
0
 /**
  * @throws DocumentException
  * @see com.itextpdf.text.html.simpleparser.HTMLTagProcessors#startElement(com.itextpdf.text.html.simpleparser.HTMLWorker, java.lang.String, java.util.Map)
  */
 public void StartElement(HTMLWorker worker, String tag, IDictionary <String, String> attrs)
 {
     worker.CarriageReturn();
     if (worker.IsPendingTD())
     {
         worker.EndElement(tag);
     }
     worker.SetSkipText(false);
     worker.SetPendingTD(true);
     worker.UpdateChain(HtmlTags.TD, attrs);
     worker.PushToStack(worker.CreateCell(tag));
 }
示例#3
0
            /**
             * @throws DocumentException
             * @see com.itextpdf.text.html.simpleparser.HTMLTagProcessors#startElement(com.itextpdf.text.html.simpleparser.HTMLWorker, java.lang.String, java.util.Map)
             */
            public void StartElement(HTMLWorker worker, String tag, IDictionary <String, String> attrs)
            {
                worker.CarriageReturn();
                TableWrapper table = new TableWrapper(attrs);

                worker.PushToStack(table);
                worker.PushTableState();
                worker.SetPendingTD(false);
                worker.SetPendingTR(false);
                worker.SetSkipText(true);
                // Table alignment should not affect children elements, thus remove
                attrs.Remove(HtmlTags.ALIGN);
                worker.UpdateChain(tag, attrs);
            }
            /**
             * @throws DocumentException
             * @see com.itextpdf.text.html.simpleparser.HTMLTagProcessors#startElement(com.itextpdf.text.html.simpleparser.HTMLWorker, java.lang.String, java.util.Map)
             */
            virtual public void StartElement(HTMLWorker worker, String tag, IDictionary <String, String> attrs)
            {
                worker.CarriageReturn();
                TableWrapper table = new TableWrapper(attrs);

                worker.PushToStack(table);
                worker.PushTableState();
                worker.SetPendingTD(false);
                worker.SetPendingTR(false);
                worker.SetSkipText(true);
                // Table alignment should not affect children elements, thus remove
                attrs.Remove(HtmlTags.ALIGN);
                // In case this is a nested table reset colspan and rowspan
                attrs[HtmlTags.COLSPAN] = "1";
                attrs[HtmlTags.ROWSPAN] = "1";
                worker.UpdateChain(tag, attrs);
            }