HeadingLevels
Contents
[
Hide
]Inheritance: java.lang.Object, com.aspose.pdf.markdownoptions.HeadingLevels
public class HeadingLevels extends Object
Represents a class to work with header levels based on font size.
Constructors
| Constructor | Description |
|---|---|
| HeadingLevels | Creates a new instance of the HeadingLevels class. |
| HeadingLevels | Creates a new instance of the HeadingLevels class. |
Methods
| Method | Description |
|---|---|
| addLevels | Adds heading levels. |
| estimateLevel | Estimates the possible header level. If fontSize is not found in the list of levels, the level closest to this font size value will be returned. If fontSize is outside the minimum and maximum header levels specified, the method will return false. |
| findLevel | Finds level for corresponding font size. Looking for an exact match. |
| getAllLevels | Gets all heading levels. |
HeadingLevels
public HeadingLevels()
Creates a new instance of the HeadingLevels class.
HeadingLevels
public HeadingLevels(double threshold)
Creates a new instance of the HeadingLevels class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| threshold | The threshold value to compare font sizes. Within the threshold, the header levels are the same. The threshold default value is 0.01. |
addLevels
Adds heading levels.
estimateLevel
public final int estimateLevel(double fontSize)
Estimates the possible header level. If fontSize is not found in the list of levels, the level closest to this font size value will be returned. If fontSize is outside the minimum and maximum header levels specified, the method will return false.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fontSize | The font size. |
Returns: Heading level.
findLevel
public final boolean findLevel(double fontSize, int[] level)
Finds level for corresponding font size. Looking for an exact match.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fontSize | The font size. | |
| level | The corresponding heading level for given font size. |
Returns: False If the fontSize is not within the specified range.
getAllLevels
public final com.aspose.ms.System.Collections.IEnumerable< Double > getAllLevels()
Gets all heading levels.
Returns: IEnumerable of Double