Class Table
java.lang.Object
com.itextpdf.tool.xml.html.AbstractTagProcessor
com.itextpdf.tool.xml.html.table.Table
- All Implemented Interfaces:
CssAppliersAware, TagProcessor
- Author:
- Emiel Ackermann
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionend(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).static floatExtracts and parses the style border-spacing or the attribute cellspacing of a table tag, if present.protected PdfPTableintPdfPTable(int numberOfColumn) booleanDefaults to false.static TableStyleValuesstatic TableStyleValuessetStyleValues(Tag tag) Set the table style values in aTableStyleValuesobject based on attributes and css of the given tag.Methods inherited from class AbstractTagProcessor
content, createParagraph, currentContentToParagraph, currentContentToParagraph, doRtlIndentCorrections, endElement, getCssAppliers, getCSSResolver, getHtmlPipelineContext, getRunDirection, invertTextAlignForParagraph, invertTextAlignForParagraph, setCssAppliers, start, startElement, textContent, updateParagraphFontIfNeeded
-
Field Details
-
DEFAULT_CELL_BORDER_WIDTH
public static final float DEFAULT_CELL_BORDER_WIDTH- See Also:
-
-
Constructor Details
-
Table
public Table()Default constructor.
-
-
Method Details
-
end
Description copied from class:AbstractTagProcessorClasses extending AbstractTagProcessor should override this method for actions that should be done inTagProcessor.endElement(WorkerContext, Tag, List). TheAbstractTagProcessor.endElement(WorkerContext, Tag, List)calls this method after or before doing certain stuff, (see it's description).- Overrides:
endin classAbstractTagProcessor- Parameters:
ctx- the WorkerContexttag- the tagcurrentContent- the content created from e.g. inner tags, inner content and not yet added to document.- Returns:
- a List containing iText Element objects
-
intPdfPTable
-
setStyleValues
Set the table style values in aTableStyleValuesobject based on attributes and css of the given tag.- Parameters:
tag- containing attributes and css.- Returns:
- a
TableStyleValuesobject containing the table's style values.
-
setBorderAttributeForCell
-
getBorderOrCellSpacing
public static float getBorderOrCellSpacing(boolean getHor, Map<String, String> css, Map<String, String> attributes) Extracts and parses the style border-spacing or the attribute cellspacing of a table tag, if present. Favors the style border-spacing over the attribute cellspacing.
If style="border-collapse:collapse" is found in the css, the spacing is always 0f.
If no spacing is set, the default of 1.5pt is returned.- Parameters:
getHor- true for horizontal spacing, false for vertical spacing.css- of the table tag.attributes- of the table tag.- Returns:
- horizontal or vertical spacing between two cells or a cell and the border of the table.
-
isStackOwner
public boolean isStackOwner()Description copied from class:AbstractTagProcessorDefaults to false.- Specified by:
isStackOwnerin interfaceTagProcessor- Overrides:
isStackOwnerin classAbstractTagProcessor- Returns:
- true if the tag implementation must keep it's own currentContent stack.
- See Also:
-