Uses of Interface
com.itextpdf.tool.xml.WorkerContext
Packages that use WorkerContext
Package
Description
XMLWorker package provides a framework to parse XML to PDF with iText.
Everything to parse HTML tags to pdf used by the
HtmlPipeline
is in here.TagProcessor implementations for tags in HTML head.
TagProcessor implementations for
table
tags.The pipeline package contains the pipeline implementations
Contains CSS processing pipeline.
Collection of
CustomContext
and
WorkerContext
implementations.Contains pipelines that can be used as last pipe in the line.
Contains pipeline stuff for HTML
-
Uses of WorkerContext in com.itextpdf.tool.xml
Methods in com.itextpdf.tool.xml that return WorkerContextModifier and TypeMethodDescriptionprotected static WorkerContext
XMLWorker.getLocalWC()
Returns the local WorkerContext, beware: could be a newly initialized one, ifXMLWorker.close()
orXMLWorker.closeLocalWC()
has been called before.Methods in com.itextpdf.tool.xml with parameters of type WorkerContextModifier and TypeMethodDescriptionPipeline
<?> Pipeline.close
(WorkerContext context, Tag t, ProcessObject po) Called when a closing tag has been encountered.Pipeline
<?> Pipeline.content
(WorkerContext context, Tag t, String content, ProcessObject po) Called when content has been encountered.Pipeline
<?> Pipeline.init
(WorkerContext context) The init method allows implementation to initialize the pipeline.Pipeline
<?> Pipeline.open
(WorkerContext context, Tag t, ProcessObject po) Called when an opening tag has been encountered. -
Uses of WorkerContext in com.itextpdf.tool.xml.html
Methods in com.itextpdf.tool.xml.html with parameters of type WorkerContextModifier and TypeMethodDescriptionprivate void
ParaGraph.addTabIntervalContent
(WorkerContext ctx, Tag tag, List<Element> currentContent, Paragraph p, String value) Applies the tab interval of the p tag on itsTabbedChunk
elements.private float
OrderedUnorderedList.calculateTopOrBottomSpacing
(boolean isTop, boolean storeMarginBottom, Tag tag, Tag child, WorkerContext ctx) Calculates top or bottom spacing of the list.AbstractTagProcessor.content
(WorkerContext ctx, Tag tag, String content) Anchor.content
(WorkerContext ctx, Tag tag, String content) Body.content
(WorkerContext ctx, Tag tag, String content) Div.content
(WorkerContext ctx, Tag tag, String content) DummyTagProcessor.content
(WorkerContext ctx, Tag tag, String content) Header.content
(WorkerContext ctx, Tag tag, String content) NonSanitizedTag.content
(WorkerContext ctx, Tag tag, String content) OrderedUnorderedListItem.content
(WorkerContext ctx, Tag tag, String content) ParaGraph.content
(WorkerContext ctx, Tag tag, String content) Span.content
(WorkerContext ctx, Tag tag, String content) TagProcessor.content
(WorkerContext ctx, Tag tag, String content) This method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.AbstractTagProcessor.currentContentToParagraph
(List<Element> currentContent, boolean addNewLines, boolean applyCSS, Tag tag, WorkerContext ctx) Adds currentContent list to a paragraph element.AbstractTagProcessor.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Classes extending AbstractTagProcessor should override this method for actions that should be done inTagProcessor.endElement(WorkerContext, Tag, List)
.Anchor.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Break.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Div.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Header.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Image.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) NonSanitizedTag.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) OrderedUnorderedList.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) OrderedUnorderedListItem.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) ParaGraph.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) Span.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) AbstractTagProcessor.endElement
(WorkerContext ctx, Tag tag, List<Element> currentContent) Checks forCSS.Property.PAGE_BREAK_AFTER
, if the value is always aChunk.NEXTPAGE
is added to the currentContentList after callingAbstractTagProcessor.end(WorkerContext, Tag, List)
.DummyTagProcessor.endElement
(WorkerContext ctx, Tag tag, List<Element> currentContent) TagProcessor.endElement
(WorkerContext ctx, Tag tag, List<Element> currentContent) This method is called when a closing tag has been encountered of the TagProcessor implementation that is mapped to the tag.AbstractTagProcessor.getCSSResolver
(WorkerContext context) Utility method that fetches the CSSResolver from the if any and if it uses the default key.AbstractTagProcessor.getHtmlPipelineContext
(WorkerContext context) Utility method that fetches the HtmlPipelineContext used if any and if it uses the default key.protected void
ParaGraph.processListItems
(WorkerContext ctx, Tag tag, List<ListItem> listItems, List<Element> l) protected void
ParaGraph.processParagraphItems
(WorkerContext ctx, Tag tag, List<Element> paragraphItems, List<Element> l) AbstractTagProcessor.start
(WorkerContext ctx, Tag tag) Classes extending AbstractTagProcessor should override this method for actions that should be done inTagProcessor.startElement(WorkerContext, Tag)
.Body.start
(WorkerContext ctx, Tag tag) HorizontalRule.start
(WorkerContext ctx, Tag tag) AbstractTagProcessor.startElement
(WorkerContext ctx, Tag tag) Calculates any found font size to pt values and set it in the CSS before callingAbstractTagProcessor.start(WorkerContext, Tag)
.
Checks forCSS.Property.PAGE_BREAK_BEFORE
, if the value is always aChunk.NEXTPAGE
added before the implementorsAbstractTagProcessor.start(WorkerContext, Tag)
method.DummyTagProcessor.startElement
(WorkerContext ctx, Tag tag) TagProcessor.startElement
(WorkerContext ctx, Tag tag) This method is called when a tag has been encountered.AbstractTagProcessor.textContent
(WorkerContext ctx, Tag tag, String content) -
Uses of WorkerContext in com.itextpdf.tool.xml.html.head
Methods in com.itextpdf.tool.xml.html.head with parameters of type WorkerContextModifier and TypeMethodDescriptionStyle.content
(WorkerContext ctx, Tag tag, String content) Title.content
(WorkerContext ctx, Tag tag, String content) Link.start
(WorkerContext ctx, Tag tag) Meta.start
(WorkerContext ctx, Tag tag) XML.start
(WorkerContext ctx, Tag tag) -
Uses of WorkerContext in com.itextpdf.tool.xml.html.table
Methods in com.itextpdf.tool.xml.html.table with parameters of type WorkerContextModifier and TypeMethodDescriptionprivate float
Table.calculateTargetWidth
(Tag tag, float[] columnWidths, float outerWidth, WorkerContext ctx) Calculates the target width.TableData.content
(WorkerContext ctx, Tag tag, String content) Table.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) TableData.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) TableRow.end
(WorkerContext ctx, Tag tag, List<Element> currentContent) private float
Table.getTableOuterWidth
(Tag tag, float horBorderSpacing, WorkerContext ctx) Adds horizontal values of a table and its parent if present.protected void
TableData.processListItems
(WorkerContext ctx, Tag tag, List<ListItem> listItems, HtmlCell cell) private void
Table.setVerticalMargin
(PdfPTable table, Tag t, TableStyleValues values, WorkerContext ctx) Sets the top and bottom margin of the given table. -
Uses of WorkerContext in com.itextpdf.tool.xml.pipeline
Methods in com.itextpdf.tool.xml.pipeline with parameters of type WorkerContextModifier and TypeMethodDescriptionPipeline
<?> AbstractPipeline.close
(WorkerContext context, Tag t, ProcessObject po) Just calls getNext.
Override this to get notified on encountered closing tags.Pipeline
<?> AbstractPipeline.content
(WorkerContext ctx, Tag currentTag, String text, ProcessObject po) Just calls getNext.
Override this to get notified on encountered content.AbstractPipeline.getLocalContext
(WorkerContext context) Returns the local context for this class using getContextKey, override this together with getContextKey to change the key usage in case you want to add multiple identical pipelines to the worker.Pipeline
<?> AbstractPipeline.init
(WorkerContext context) Pipeline
<?> AbstractPipeline.open
(WorkerContext context, Tag t, ProcessObject po) Just calls getNext.
Override this to get notified on encountered opening tags. -
Uses of WorkerContext in com.itextpdf.tool.xml.pipeline.css
Methods in com.itextpdf.tool.xml.pipeline.css with parameters of type WorkerContextModifier and TypeMethodDescriptionPipeline
<?> CssResolverPipeline.init
(WorkerContext context) Pipeline
<?> CssResolverPipeline.open
(WorkerContext context, Tag t, ProcessObject po) -
Uses of WorkerContext in com.itextpdf.tool.xml.pipeline.ctx
Classes in com.itextpdf.tool.xml.pipeline.ctx that implement WorkerContextModifier and TypeClassDescriptionclass
The global WorkerContext, a storage for CustomContexts. -
Uses of WorkerContext in com.itextpdf.tool.xml.pipeline.end
Methods in com.itextpdf.tool.xml.pipeline.end with parameters of type WorkerContextModifier and TypeMethodDescriptionElementHandlerPipeline.close
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> PdfWriterPipeline.close
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> ElementHandlerPipeline.content
(WorkerContext ctx, Tag currentTag, String text, ProcessObject po) Pipeline
<?> PdfWriterPipeline.content
(WorkerContext context, Tag currentTag, String text, ProcessObject po) Pipeline
<?> PdfWriterPipeline.init
(WorkerContext context) ElementHandlerPipeline.open
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> PdfWriterPipeline.open
(WorkerContext context, Tag t, ProcessObject po) private void
PdfWriterPipeline.write
(WorkerContext context, ProcessObject po) -
Uses of WorkerContext in com.itextpdf.tool.xml.pipeline.html
Methods in com.itextpdf.tool.xml.pipeline.html with parameters of type WorkerContextModifier and TypeMethodDescriptionPipeline
<?> AutoDocPipeline.close
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> HtmlPipeline.close
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> HtmlPipeline.content
(WorkerContext context, Tag t, String text, ProcessObject po) Pipeline
<?> HtmlPipeline.init
(WorkerContext context) Pipeline
<?> AutoDocPipeline.open
(WorkerContext context, Tag t, ProcessObject po) Pipeline
<?> HtmlPipeline.open
(WorkerContext context, Tag t, ProcessObject po)