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
| Signature | Description |
|---|---|
applyInlineStyle(ctx: CssContext, styleStr: String) | Parses an inline CSS style string and applies recognized properties |
| to the given context. | |
parseDimension(value: String, base: double) → double | Parses a CSS dimension value and converts it to PDF points (1pt = 1/72 in). |
parseColor(value: String) → Color | Parses a CSS color value and returns a {@link Color}. |
parseFont(value: String) → String | Extracts the first font name from a CSS font-family value. |
isBold(value: String) → boolean | Determines 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. |