Applies to
Description
Gets or sets the text alignment in the PDF document
Data type
PDFTextAlignment.
The PDFTextAlignment is an enumerated datatype that can hold the following values:
Enumerated Value | Meaning |
---|---|
PDFTextAlignLeft! | Left aligned. |
PDFTextAlignCenter! | Center aligned. |
PDFTextAlignRight! | Right aligned. |
PDFTextAlignJustify! | Justify aligned (Space is added between words so that the edges of all lines are aligned with the margins). |
Usage
Usage
In scripts
The Alignment property sets the alignment of the text or text block in a PDF document.
The following example uses the PDFTextLayout object to set the layout of a PDFMultilineText object:
lpdf_mtext = create PDFmultilinetext lpdf_layout = create PDFtextlayout lpdf_layout.leftindent = 100 lpdf_layout.rightindent = 100 lpdf_layout.charspacing = 10 lpdf_layout.firstlineindent = 100 lpdf_layout.linespacing = 500 lpdf_layout.alignment= PDFTextAlignCenter! lpdf_mtext.width = lpdf_page.getwidth( ) lpdf_mtext.content="The PDFDocument object allows to import data from a DataWindow object, a DataWindowChild object or a DataStore object, or an existing PDF document to a new PDF document and save the document." lpdf_mtext.layout = lpdf_layout