/// <summary> /// Creates a new /// <see cref="TableTagWorker"/> /// instance. /// </summary> /// <param name="element">the element</param> /// <param name="context">the context</param> public TableTagWorker(IElementNode element, ProcessorContext context) { String str = element.GetStyles().Get(CssConstants.DIRECTION); bool isRtl = "rtl".Equals(str); tableWrapper = new TableWrapper(isRtl); parentTagWorker = context.GetState().Empty() ? null : context.GetState().Top(); if (parentTagWorker is iText.Html2pdf.Attach.Impl.Tags.TableTagWorker) { ((iText.Html2pdf.Attach.Impl.Tags.TableTagWorker)parentTagWorker).ApplyColStyles(); } else { colgroupsHelper = new WaitingColgroupsHelper(element); } display = element.GetStyles() != null?element.GetStyles().Get(CssConstants.DISPLAY) : null; String lang = element.GetAttribute(AttributeConstants.LANG); if (lang != null) { tableWrapper.SetLang(lang); } }