/** * */ public CssAppliers() { chunk = new ChunkCssApplier(); paragraph = new ParagraphCssApplier(); nonewlineparagraph = new NoNewLineParagraphCssApplier(); htmlcell = new HtmlCellCssApplier(); list = new ListStyleTypeCssApplier(); lineseparator = new LineSeparatorCssApplier(); image = new ImageCssApplier(); }
/** * */ public CssAppliersImpl() { map = new Dictionary <Type, ICssApplier>(); map[typeof(Chunk)] = new ChunkCssApplier(null); map[typeof(Paragraph)] = new ParagraphCssApplier(this); map[typeof(NoNewLineParagraph)] = new NoNewLineParagraphCssApplier(); map[typeof(HtmlCell)] = new HtmlCellCssApplier(); map[typeof(List)] = new ListStyleTypeCssApplier(); map[typeof(LineSeparator)] = new LineSeparatorCssApplier(); map[typeof(text.Image)] = new ImageCssApplier(); map[typeof(PdfDiv)] = new DivCssApplier(); }
/* (non-Javadoc) * @see com.itextpdf.tool.xml.ITagProcessor#endElement(com.itextpdf.tool.xml.Tag, java.util.List, com.itextpdf.text.Document) */ public override IList <IElement> End(IWorkerContext ctx, Tag tag, IList <IElement> currentContent) { try { IList <IElement> list = new List <IElement>(); HtmlPipelineContext htmlPipelineContext = GetHtmlPipelineContext(ctx); LineSeparator lineSeparator = new LineSeparatorCssApplier(htmlPipelineContext).Apply(new LineSeparator(), tag); Paragraph p = new Paragraph(); p.Add(lineSeparator); list.Add(new ParagraphCssApplier(htmlPipelineContext).Apply(p, tag)); return(list); } catch (NoCustomContextException e) { throw new RuntimeWorkerException(LocaleMessages.GetInstance().GetMessage(LocaleMessages.NO_CUSTOM_CONTEXT), e); } }