Class DefaultCssResolver
java.lang.Object
com.itextpdf.html2pdf.css.resolve.DefaultCssResolver
- All Implemented Interfaces:
-
com.itextpdf.styledxmlparser.css.ICssResolver
public class DefaultCssResolver extends Object implements com.itextpdf.styledxmlparser.css.ICssResolver
Default implementation of the
ICssResolver
interface.
-
Constructor Summary
ConstructorDescriptionDefaultCssResolver
(com.itextpdf.styledxmlparser.node.INode treeRoot, ProcessorContext context) Creates a newDefaultCssResolver
instance.DefaultCssResolver
(com.itextpdf.styledxmlparser.node.INode treeRoot, com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription mediaDeviceDescription, com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver) Creates a newDefaultCssResolver
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetFonts()
Gets the list of fonts.void
resolveContentAndCountersStyles
(com.itextpdf.styledxmlparser.node.INode node, CssContext context) Resolves content and counter(s) styles of a node given the passed context.resolveStyles
(com.itextpdf.styledxmlparser.node.INode element, com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext context)
-
Constructor Details
-
DefaultCssResolver
public DefaultCssResolver(com.itextpdf.styledxmlparser.node.INode treeRoot, com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription mediaDeviceDescription, com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver) Creates a newDefaultCssResolver
instance.- Parameters:
-
treeRoot
- the root node -
mediaDeviceDescription
- the media device description -
resourceResolver
- the resource resolver
-
DefaultCssResolver
public DefaultCssResolver(com.itextpdf.styledxmlparser.node.INode treeRoot, ProcessorContext context) Creates a newDefaultCssResolver
instance.- Parameters:
-
treeRoot
- the root node -
context
- the processor context
-
-
Method Details
-
getFonts
Gets the list of fonts.- Returns:
-
the list of
CssFontFaceRule
instances
-
resolveContentAndCountersStyles
public void resolveContentAndCountersStyles(com.itextpdf.styledxmlparser.node.INode node, CssContext context) Resolves content and counter(s) styles of a node given the passed context.- Parameters:
-
node
- the node -
context
- the CSS context (RootFontSize, etc.)
-
resolveStyles
public Map<String,String> resolveStyles(com.itextpdf.styledxmlparser.node.INode element, com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext context) - Specified by:
-
resolveStyles
in interfacecom.itextpdf.styledxmlparser.css.ICssResolver
-