CssStyleParser

CssStyleParser

Overview

CssStyleParser is a class in Aspose.Pdf FOSS for Java.

Parses inline CSS style strings and applies them to a {@link CssContext}.

Methods

SignatureDescription
applyInlineStyle(ctx: CssContext, styleStr: String)Parses an inline CSS style string and applies recognized properties
to the given context.
parseDimension(value: String, base: double)doubleParses a CSS dimension value and converts it to PDF points (1pt = 1/72 in).
parseColor(value: String)ColorParses a CSS color value and returns a {@link Color}.
parseFont(value: String)StringExtracts the first font name from a CSS font-family value.
isBold(value: String)booleanDetermines whether a CSS font-weight value represents bold.
parseMarginShorthand(ctx: CssContext, value: String)Parses a CSS margin shorthand value and applies it to the context.

See Also