Package | Description |
---|---|
com.itextpdf.tool.xml |
XMLWorker package provides a framework to parse XML to PDF with iText.
|
com.itextpdf.tool.xml.css |
Collection of classes to handle css files, rules, properties.
|
com.itextpdf.tool.xml.css.apply |
Contains classes that can apply css rules on certain Element s.
|
com.itextpdf.tool.xml.html |
Everything to parse HTML tags to pdf used by the HtmlPipeline is in here.
|
com.itextpdf.tool.xml.html.head |
TagProcessor implementations for tags in HTML head.
|
com.itextpdf.tool.xml.html.table |
TagProcessor implementations for table tags.
|
com.itextpdf.tool.xml.pipeline |
The pipeline package contains the pipeline implementations
|
com.itextpdf.tool.xml.pipeline.css |
Contains CSS processing pipeline.
|
com.itextpdf.tool.xml.pipeline.ctx |
Collection of CustomContext and WorkerContext implementations.
|
com.itextpdf.tool.xml.pipeline.end |
Contains pipelines that can be used as last pipe in the line.
|
com.itextpdf.tool.xml.pipeline.html |
Contains pipeline stuff for HTML
|
com.itextpdf.tool.xml.util |
Modifier and Type | Method and Description |
---|---|
protected Tag |
XMLWorker.createTag(String tag, Map<String,String> attr, String ns)
Creates a new Tag object from the given parameters.
|
Tag |
Tag.getChild(String name, String ns)
Finds the first child that matches the given name and namespace.
|
Tag |
Tag.getChild(String name, String ns, boolean recursive)
Finds the first child that matches the given name and ns.
|
protected Tag |
XMLWorker.getCurrentTag()
Returns the current tag.
|
Tag |
WorkerContext.getCurrentTag() |
Tag |
Tag.getParent()
Returns the parent tag for this tag.
|
Tag |
TagUtils.getSibling(Tag t, int i)
Method used for retrieving a sibling of the given tag t.
|
Modifier and Type | Method and Description |
---|---|
List<Tag> |
Tag.getChildren()
Returns all children of this tag.
|
List<Tag> |
Tag.getChildren(String name)
Returns all children of this tag with the given name.
|
Iterator<Tag> |
Tag.iterator() |
Modifier and Type | Method and Description |
---|---|
void |
Tag.addChild(Tag t)
Add a child tag to this tag.
|
Pipeline> |
Pipeline.close(WorkerContext context, Tag t, ProcessObject po)
Called when a closing tag has been encountered.
|
boolean |
Tag.compareTag(Tag t)
Compare this tag with t for namespace and name equality.
|
Pipeline> |
Pipeline.content(WorkerContext context, Tag t, String content, ProcessObject po)
Called when content has been encountered.
|
Tag |
TagUtils.getSibling(Tag t, int i)
Method used for retrieving a sibling of the given tag t.
|
Pipeline> |
Pipeline.open(WorkerContext context, Tag t, ProcessObject po)
Called when an opening tag has been encountered.
|
void |
WorkerContext.setCurrentTag(Tag t)
Contains the current tag.
|
void |
Tag.setParent(Tag parent)
Set the tags parent tag.
|
Modifier and Type | Method and Description |
---|---|
float |
CssUtils.checkMetricStyle(Tag t, String style)
Use only if value of style is a metric value ( CssUtils.isMetricValue(String) ) or a numeric value in pixels (CssUtils.isNumericValue(String) ).
Checks if the style is present in the css of the tag, then parses it to pt. |
List<CssRule> |
CssFileImpl.get(Tag t) |
List<CssRule> |
CssFile.get(Tag t)
Return CSS declarations for the given tag.
|
List<CssRule> |
CSSFileWrapper.get(Tag t) |
Map<String,String> |
CssFilesImpl.getCSS(Tag t)
Processes a tag and retrieves CSS.
|
Map<String,String> |
CssFiles.getCSS(Tag t)
Looks for all CSS properties that affect the given tag.
|
float |
FontSizeTranslator.getFontSize(Tag tag)
Retrieves the pt font size from getCSS() with CSS.Property.FONT_SIZE or returns default 12pt
|
Float |
HeightCalculator.getHeight(Tag tag, float pageHeight) |
float |
CssUtils.getLeftAndRightMargin(Tag t, float pageWidth)
Returns the sum of the left and right margin of a tag.
|
float |
WidthCalculator.getWidth(Tag tag, List<String> roottags, float pagewidth)
Tries to calculate a width from a tag and it's ancestors.
|
float |
WidthCalculator.getWidth(Tag tag, List<String> roottags, float pagewidth, float initialTotalWidth) |
boolean |
DefaultCssInheritanceRules.inheritCssSelector(Tag tag, String key) |
boolean |
CssInheritanceRules.inheritCssSelector(Tag tag, String key)
Validate inheritance of any CSS property for the given tag.
|
boolean |
CssSelectorItem.matches(Tag t) |
boolean |
CssSelector.matches(Tag t) |
void |
CssFilesImpl.populateCss(Tag t, Map<String,String> aggregatedProps) |
void |
StyleAttrCSSResolver.resolveStyles(Tag t)
Also taking into account the CSS properties of any parent tag in the given tag.
|
float |
FontSizeTranslator.translateFontSize(Tag tag)
Returns the css value of the style font-size in a pt-value.
|
Modifier and Type | Method and Description |
---|---|
Chunk |
ChunkCssApplier.apply(Chunk c, Tag t) |
Chunk |
ChunkCssApplier.apply(Chunk c, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) |
HtmlCell |
HtmlCellCssApplier.apply(HtmlCell cell, Tag t, MarginMemory memory, PageSizeContainable psc)
Applies css to a HtmlCell
|
HtmlCell |
HtmlCellCssApplier.apply(HtmlCell cell, Tag t, MarginMemory memory, PageSizeContainable psc, HtmlPipelineContext ctx) |
Image |
ImageCssApplier.apply(Image img, Tag tag)
Applies CSS to an Image.
|
Image |
ImageCssApplier.apply(Image img, Tag tag, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) |
LineSeparator |
LineSeparatorCssApplier.apply(LineSeparator ls, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) |
LineSeparator |
LineSeparatorCssApplier.apply(LineSeparator ls, Tag t, PageSizeContainable psc)
Applies CSS to LineSeparators
|
Element |
ListStyleTypeCssApplier.apply(List e, Tag t)
Utility method applying style to a list when no ImageProvider is available.
|
List |
ListStyleTypeCssApplier.apply(List list, Tag t, HtmlPipelineContext context)
The ListCssApplier has the capabilities to change the type of the given List dependable on the css.
|
List |
ListStyleTypeCssApplier.apply(List list, Tag t, MarginMemory memory, PageSizeContainable psc, HtmlPipelineContext context) |
NoNewLineParagraph |
NoNewLineParagraphCssApplier.apply(NoNewLineParagraph p, Tag t, MarginMemory configuration)
Styles a NoNewLineParagraph
|
NoNewLineParagraph |
NoNewLineParagraphCssApplier.apply(NoNewLineParagraph p, Tag t, MarginMemory configuration, PageSizeContainable psc, HtmlPipelineContext ctx) |
Paragraph |
ParagraphCssApplier.apply(Paragraph p, Tag t, MarginMemory configuration)
Styles a paragraph
|
Paragraph |
ParagraphCssApplier.apply(Paragraph p, Tag t, MarginMemory configuration, PageSizeContainable psc, HtmlPipelineContext ctx) |
PdfDiv |
DivCssApplier.apply(PdfDiv div, Tag t, MarginMemory memory, PageSizeContainable psc, HtmlPipelineContext context) |
Font |
ChunkCssApplier.applyFontStyles(Tag t) |
Float |
MaxLeadingAndSize.calculateLeading(Tag t)
Calculates the leading of the given tag.
|
void |
MaxLeadingAndSize.setLeading(Tag tag)
Set the largest leading based on calculateLeading only.
|
void |
MaxLeadingAndSize.setVariablesBasedOnChildren(Tag t)
Sets largest font size and largest leading based on the css styles "font-size" and "line-height" of a given tag and its children.
|
Modifier and Type | Method and Description |
---|---|
float |
MaxLeadingAndSize.getLargestFontFromChildren(List<Tag> children)
Iterates over all children in a List and returns the largest font size found.
|
Modifier and Type | Method and Description |
---|---|
Element |
CssAppliersImpl.apply(Element e, Tag t, HtmlPipelineContext ctx) |
Element |
CssAppliers.apply(Element e, Tag t, HtmlPipelineContext ctx)
Convenience method.
|
Element |
CssAppliersImpl.apply(Element e, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) |
Element |
CssAppliers.apply(Element e, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
Given the element e, this method will lookup the right applier for the given Element.
|
T |
CssApplier.apply(T e, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
Styles an element
|
List<Element> |
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.
|
List<Element> |
Span.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
ParaGraph.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
OrderedUnorderedListItem.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
NonSanitizedTag.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
Header.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
DummyTagProcessor.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
Div.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
Body.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
Anchor.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
AbstractTagProcessor.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
AbstractTagProcessor.currentContentToParagraph(List<Element> currentContent, boolean addNewLines, boolean applyCSS, Tag tag, WorkerContext ctx)
Adds currentContent list to a paragraph element.
|
List<Element> |
Span.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
ParaGraph.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
OrderedUnorderedListItem.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
OrderedUnorderedList.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
NonSanitizedTag.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Image.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Header.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Div.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Break.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Anchor.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
AbstractTagProcessor.end(WorkerContext ctx, Tag tag, List<Element> currentContent)
Classes extending AbstractTagProcessor should override this method for actions that should be done in TagProcessor.endElement(WorkerContext, Tag, List) .
|
List<Element> |
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.
|
List<Element> |
DummyTagProcessor.endElement(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
AbstractTagProcessor.endElement(WorkerContext ctx, Tag tag, List<Element> currentContent)
Checks for CSS.Property.PAGE_BREAK_AFTER , if the value is always a Chunk.NEXTPAGE is added to the currentContentList after calling AbstractTagProcessor.end(WorkerContext, Tag, List) .
|
protected int |
AbstractTagProcessor.getRunDirection(Tag tag) |
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) |
List<Element> |
HorizontalRule.start(WorkerContext ctx, Tag tag) |
List<Element> |
Body.start(WorkerContext ctx, Tag tag) |
List<Element> |
AbstractTagProcessor.start(WorkerContext ctx, Tag tag)
Classes extending AbstractTagProcessor should override this method for actions that should be done in TagProcessor.startElement(WorkerContext, Tag) .
|
List<Element> |
TagProcessor.startElement(WorkerContext ctx, Tag tag)
This method is called when a tag has been encountered.
|
List<Element> |
DummyTagProcessor.startElement(WorkerContext ctx, Tag tag) |
List<Element> |
AbstractTagProcessor.startElement(WorkerContext ctx, Tag tag)
Calculates any found font size to pt values and set it in the CSS before calling AbstractTagProcessor.start(WorkerContext, Tag) .
Checks for CSS.Property.PAGE_BREAK_BEFORE , if the value is always a Chunk.NEXTPAGE added before the implementors AbstractTagProcessor.start(WorkerContext, Tag) method.
|
protected List<Element> |
AbstractTagProcessor.textContent(WorkerContext ctx, Tag tag, String content) |
Modifier and Type | Method and Description |
---|---|
List<Element> |
Title.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
Style.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
XML.start(WorkerContext ctx, Tag tag) |
List<Element> |
Meta.start(WorkerContext ctx, Tag tag) |
List<Element> |
Link.start(WorkerContext ctx, Tag tag) |
Modifier and Type | Method and Description |
---|---|
List<Element> |
TableData.content(WorkerContext ctx, Tag tag, String content) |
List<Element> |
TableRow.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
TableData.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
List<Element> |
Table.end(WorkerContext ctx, Tag tag, List<Element> currentContent) |
protected void |
TableData.processListItems(WorkerContext ctx, Tag tag, List<ListItem> listItems, HtmlCell cell) |
static TableStyleValues |
Table.setBorderAttributeForCell(Tag tag) |
static TableStyleValues |
Table.setStyleValues(Tag tag)
Set the table style values in a TableStyleValues object based on attributes and css of the given tag.
|
Modifier and Type | Method and Description |
---|---|
Pipeline> |
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. |
Pipeline> |
AbstractPipeline.open(WorkerContext context, Tag t, ProcessObject po)
Just calls getNext.
Override this to get notified on encountered opening tags. |
Modifier and Type | Method and Description |
---|---|
Pipeline> |
CssResolverPipeline.open(WorkerContext context, Tag t, ProcessObject po) |
void |
CSSResolver.resolveStyles(Tag t)
This method should resolve css, meaning, it will look at the css and retrieve relevant css rules for the given tag.
|
Modifier and Type | Method and Description |
---|---|
Tag |
WorkerContextImpl.getCurrentTag() |
Modifier and Type | Method and Description |
---|---|
void |
WorkerContextImpl.setCurrentTag(Tag t) |
Modifier and Type | Method and Description |
---|---|
Pipeline> |
PdfWriterPipeline.close(WorkerContext context, Tag t, ProcessObject po) |
Pipeline |
ElementHandlerPipeline.close(WorkerContext context, Tag t, ProcessObject po) |
Pipeline> |
PdfWriterPipeline.content(WorkerContext context, Tag currentTag, String text, ProcessObject po) |
Pipeline> |
ElementHandlerPipeline.content(WorkerContext ctx, Tag currentTag, String text, ProcessObject po) |
Pipeline> |
PdfWriterPipeline.open(WorkerContext context, Tag t, ProcessObject po) |
Pipeline |
ElementHandlerPipeline.open(WorkerContext context, Tag t, ProcessObject po) |
Modifier and Type | Method and Description |
---|---|
Tag |
StackKeeper.getTag() |
Modifier and Type | Method and Description |
---|---|
protected void |
HtmlPipeline.addStackKeeper(Tag t, HtmlPipelineContext hcc, TagProcessor tp) |
Pipeline> |
HtmlPipeline.close(WorkerContext context, Tag t, ProcessObject po) |
Pipeline> |
AutoDocPipeline.close(WorkerContext context, Tag t, ProcessObject po) |
Pipeline> |
HtmlPipeline.content(WorkerContext context, Tag t, String text, ProcessObject po) |
Pipeline> |
HtmlPipeline.open(WorkerContext context, Tag t, ProcessObject po) |
Pipeline> |
AutoDocPipeline.open(WorkerContext context, Tag t, ProcessObject po) |
Constructor and Description |
---|
StackKeeper(Tag t) |
Modifier and Type | Method and Description |
---|---|
List<Tag> |
ParentTreeUtil.getParentTagTree(Tag tag, List<Tag> tree)
creates a parentTree of all parent Tag objects of a given Tag
|
Modifier and Type | Method and Description |
---|---|
List<Tag> |
ParentTreeUtil.getParentTagTree(Tag tag, List<Tag> tree)
creates a parentTree of all parent Tag objects of a given Tag
|
List<String> |
ParentTreeUtil.getParentTree(Tag t)
creates a parentTree of all parents of a given Tag
|
Modifier and Type | Method and Description |
---|---|
List<Tag> |
ParentTreeUtil.getParentTagTree(Tag tag, List<Tag> tree)
creates a parentTree of all parent Tag objects of a given Tag
|
Copyright © 1998–2019. All rights reserved.