public class AnnotationTextRenderer extends Object
Class for rendering normal and rich text.
| Constructor and Description |
|---|
AnnotationTextRenderer() |
| Modifier and Type | Method and Description |
|---|---|
com.aspose.ms.System.Collections.Generic.List<Operator> |
render(String value,
Rectangle rect,
String fontName,
double fontSize,
HorizontalAlignment alignment,
Justification justification,
Border border,
Rectangle initialRect,
com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary res,
com.aspose.pdf.engine.data.IPdfObject engineObj,
double angle)
Renders plain text as PDF operators with automatic line wrapping, font selection, alignment, and rotation.
|
com.aspose.ms.System.Collections.Generic.List<Operator> |
render(String value,
Rectangle rect,
String fontName,
double fontSize,
HorizontalAlignment alignment,
Justification justification,
Border border,
Rectangle initialRect,
com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary res,
com.aspose.pdf.engine.data.IPdfObject engineObj,
double angle,
boolean useFontSubset)
Renders plain text as PDF operators with automatic line wrapping, font selection, alignment, and rotation.
|
List<Operator> |
renderRichText(String richText,
String defaultStyle,
Rectangle rect,
Rectangle innerRectWithoutRotate,
double angle,
Rectangle initialRect,
com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary resources,
Rectangle bbox,
com.aspose.pdf.engine.data.ITrailerable trailerable)
Renders rich text as a list of PDF operators, applying the specified rotation and positioning.
|
public final List<Operator> renderRichText(String richText, String defaultStyle, Rectangle rect, Rectangle innerRectWithoutRotate, double angle, Rectangle initialRect, com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary resources, Rectangle bbox, com.aspose.pdf.engine.data.ITrailerable trailerable)
Renders rich text as a list of PDF operators, applying the specified rotation and positioning.
richText - The rich text content to be rendered.defaultStyle - The default style string applied to the rich text.rect - The rectangle defining the target area for the text after rotation.innerRectWithoutRotate - The inner rectangle used for text processing before rotation.angle - The rotation angle in degrees.initialRect - The initial rectangle used for calculating the shift and rotation matrix for non‑axis‑aligned angles.resources - The resource dictionary providing fonts and other resources needed for rich text processing.bbox - The bounding box used by the rich text processor.trailerable - An ITrailerable object.public final com.aspose.ms.System.Collections.Generic.List<Operator> render(String value, Rectangle rect, String fontName, double fontSize, HorizontalAlignment alignment, Justification justification, Border border, Rectangle initialRect, com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary res, com.aspose.pdf.engine.data.IPdfObject engineObj, double angle)
Renders plain text as PDF operators with automatic line wrapping, font selection, alignment, and rotation.
value - The text to render (lines separated by CR/LF).rect - The target rectangle; determines available width for wrapping.fontName - Preferred font name; resolved via fallback strategies.fontSize - Font size in points.alignment - Horizontal alignment of the whole text block (Left, Right, Center).justification - Line justification when only one line exists (Left, Right, Center).border - Optional border; its width offsets the vertical start.initialRect - Pre‑rotation rectangle; used for non‑axis‑aligned angles.res - Resource dictionary for fonts.engineObj - PDF object.angle - Rotation angle in degrees; special‑cased for 0, 90, 180, 270.public final com.aspose.ms.System.Collections.Generic.List<Operator> render(String value, Rectangle rect, String fontName, double fontSize, HorizontalAlignment alignment, Justification justification, Border border, Rectangle initialRect, com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary res, com.aspose.pdf.engine.data.IPdfObject engineObj, double angle, boolean useFontSubset)
Renders plain text as PDF operators with automatic line wrapping, font selection, alignment, and rotation.
value - The text to render (lines separated by CR/LF).rect - The target rectangle; determines available width for wrapping.fontName - Preferred font name; resolved via fallback strategies.fontSize - Font size in points.alignment - Horizontal alignment of the whole text block (Left, Right, Center).justification - Line justification when only one line exists (Left, Right, Center).border - Optional border; its width offsets the vertical start.initialRect - Pre‑rotation rectangle; used for non‑axis‑aligned angles.res - Resource dictionary for fonts.engineObj - PDF object.angle - Rotation angle in degrees; special‑cased for 0, 90, 180, 270.useFontSubset - True to enable font subsetting.Copyright © 2026 Aspose. All Rights Reserved.