![Pdftools logo](../icons/pdftools-icon.png) | TextGenerator Constructor |
Create a new text generator for appending text to a text content object.
All parameters that cannot be set in the constructor are set to default values:
-
Rendering: fill text with black paint
-
CharacterSpacing: 0
-
WordSpacing: 0
-
HorizontalScaling: 1
-
Leading: 1.2 times the fontSize
(The font's Leading is not used.)
-
Rise: 0
-
Stroke:
-
IntersectClipping:
Namespace: PdfTools.Toolbox.Pdf.ContentAssembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.1.0+5820e9ca9ca173983539ffc40abc227fb62e6928
Syntaxpublic TextGenerator(
Text text,
Font font,
double fontSize,
Point? location
)
Parameters
- text Text
-
the text object
- font Font
-
the initial font
- fontSize Double
-
the initial font size and leading
- location NullablePoint
-
the initial position. If position is ,
the default position [0, 0] is used.
ExceptionsException | Condition |
---|
ArgumentException | if the document associated with the text object has already been closed |
ArgumentException | if the text and font objects are associated with different documents |
ArgumentException | if the document associated with the font object has already been closed |
ArgumentException | if the font has been obtained from Font |
ArgumentNullException | if text is . |
ArgumentNullException | if font is . |
See Also