[]
        
(Showing Draft Content)

LayoutProperties

DsPdfJS API v9.1.0


DsPdfJS API / LayoutProperties

Type Alias: LayoutProperties

LayoutProperties = object

Specifies properties for a new Layout object. Represents one or more paragraphs of multi-formatted text. Provides text analysis and layout functionality.

Properties

addSpacingAfterLastLine?

optional addSpacingAfterLastLine: boolean

Indicates whether the line spacing should be added after the last line of text. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


allowOverhangingWords?

optional allowOverhangingWords: boolean

Indicates whether long words can overhang beyond the layout box bounds. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


baseLayout?

optional baseLayout: Layout | null

A reference to the Layout object to copy the initial data from.


canSkipFirstLineWithIndentation?

optional canSkipFirstLineWithIndentation: boolean

Indicates whether the whole first line of a paragraph with indentation can be skipped. The default is true. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


columnWidth?

optional columnWidth: number | null

The width of the layout box measured from the left margin (for positive values) or from the right margin (for negative values), in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


defaultFormat?

optional defaultFormat: Format | null

A reference to the Format object to be used as default text format for the current Layout. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


defaultTabSize?

optional defaultTabSize: number

Spacing between the default tab stops, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


delimiterCharCode?

optional delimiterCharCode: number

A UTF-32 character code used as a delimiter that signals the beginning of the portion of text to be preserved (for text trimming). Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


delimiterCharCount?

optional delimiterCharCount: number

The delimiter count, counting from the end of the text, to preserve text from (for text trimming). Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


ellipsisCharCode?

optional ellipsisCharCode: number

A UTF-32 code of the omission sign (ellipsis character) for text trimming. Setting this property to 0 prevents the ellipsis character from showing. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


firstLineIndent?

optional firstLineIndent: number

The indent of the first line after paragraph separator, in graphic units. Positive value applies indentation to the first line, negative value applies indentation to all lines except the first one. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


firstLineIsStartOfParagraph?

optional firstLineIsStartOfParagraph: boolean

Indicates whether the first line of text is the start of paragraph. The default is true. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


flowDirection?

optional flowDirection: FlowDirection

The flow direction (how lines of text are placed relative to one another). Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


fontCollection?

optional fontCollection: FontCollection | null

The font collection used for searching fonts and font fallbacks. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


fontFallbackScope?

optional fontFallbackScope: FontFallbackScope

Specifies the scope for searching fallback fonts for the glyphs missing in the font defined in Format. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


fontScaleFactor?

optional fontScaleFactor: number

The uniform scale factor for all fonts used in the current Layout. Valid values are from 0.001 to 1000. The default is 1. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


honorIdeographicBaseline?

optional honorIdeographicBaseline: boolean

Indicates whether the ideographic baseline should be used instead of the Roman baseline for hieroglyph characters. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


honorLastLineSpacing?

optional honorLastLineSpacing: boolean

Indicates whether line spacing for the last line is considered a part of the layout content. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


honorTrailingLineBreak?

optional honorTrailingLineBreak: boolean

Indicates whether the trailing line break causes a blank line to be added to the output text layout. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


justifiedSpaceExtension?

optional justifiedSpaceExtension: number

The maximum white space extension factor before applying extension to other characters when text is justified. Valid values are from 0 to 10000. The default is 2.5. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


justifiedSpaceShrinking?

optional justifiedSpaceShrinking: number

The white space shrinking factor when text is justified. Valid values are from 0.0 to 1.0. The default is 0.2. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


justifiedTextExtension?

optional justifiedTextExtension: number

The maximum text extension factor when text is justified. Valid values are from 0 to 10000. The default is 0.3. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


justifyLastLine?

optional justifyLastLine: boolean

Indicating whether for paragraphs that have textAlignment set to "Distributed" the last line will be justified (typical in East Asian typography). Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


lastLineIsEndOfParagraph?

optional lastLineIsEndOfParagraph: boolean

Indicates whether the last line of text is the end of paragraph. The default is true. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


lineBreakingRules?

optional lineBreakingRules: LineBreakingRules

Specifies the line breaking algorithm. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


lineGapBeforeFirstLine?

optional lineGapBeforeFirstLine: boolean

Indicates whether the typographic line gap should be added before the first line of text. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


linesBetweenConsecutiveHyphens?

optional linesBetweenConsecutiveHyphens: number

The minimum number of lines not using hyphens after breaking a word across lines and displaying a visible hyphen at the position of soft hyphen. The default is 0. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


lineSpacingScaleFactor?

optional lineSpacingScaleFactor: number

The scaling factor to be applied to the computed line height. Valid values are from 0 to 1000. The default is 1. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


marginAll?

optional marginAll: number

Sets all margins of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


marginBottom?

optional marginBottom: number

The bottom margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


marginLeft?

optional marginLeft: number

The left margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


marginRight?

optional marginRight: number

The right margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


marginTop?

optional marginTop: number

The top margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


maxHeight?

optional maxHeight: number | null

The height of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


maxLastLineOverflowFactor?

optional maxLastLineOverflowFactor: number

The maximum fraction of the last line's height overflowing beyond the layout bounds for that line not to be truncated. The default is 0 (last line must completely fit within the layout bounds). Valid values are from 0 to 1. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


maxWidth?

optional maxWidth: number | null

The width of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


minimalLineSpacing?

optional minimalLineSpacing: number | null

The explicit minimal distance between lines, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


paragraphAlignment?

optional paragraphAlignment: ParagraphAlignment

The alignment of paragraphs along the flow direction axis. The default is "Near". Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


paragraphSpacing?

optional paragraphSpacing: number

The additional spacing between paragraphs, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


restrictedFontLookup?

optional restrictedFontLookup: boolean

Indicates whether the fonts should be searched in the custom collection only, if any specified. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


rightToLeft?

optional rightToLeft: boolean

The base direction for horizontal and sideways text. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


rotateSidewaysCounterclockwise?

optional rotateSidewaysCounterclockwise: boolean

Indicates whether sideways text should be rotated counterclockwise. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


rowHeight?

optional rowHeight: number | null

The height of the layout box measured from the top margin (for positive values) or from the bottom margin (for negative values), in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


runs?

optional runs: RunProperties[]

The array of text runs to apply layout.


softHyphenReplacementCharCode?

optional softHyphenReplacementCharCode: number

A UTF-32 character code used as replacement for soft hyphen characters (0x00AD) at ends of lines when breaking words across lines. The default is 0x002D (the Unicode hyphen-minus character). Setting this to 0 breaks words without showing any visible hyphen character. Setting this to -1 prevents breaking words at soft hyphens. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


suppressShaping?

optional suppressShaping: boolean

Indicating if shaping and positioning of graphemes should be skipped for the sake of speed. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


tabStops?

optional tabStops: TabStop[] | null

The array of custom tab stops. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


textAlignment?

optional textAlignment: TextAlignment

The alignment of text along the reading direction axis. The default is "Leading". Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


textExtensionStrategy?

optional textExtensionStrategy: TextExtensionStrategy

Specifies the rules used for justified text extension. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


trimmingGranularity?

optional trimmingGranularity: TrimmingGranularity

The text granularity used to trim text overflowing the layout box. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


uniformLineSpacing?

optional uniformLineSpacing: number | null

The explicit distance between lines, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


useEmbeddableFonts?

optional useEmbeddableFonts: boolean

Indicates if the linked and fallback fonts have to be embeddable. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


wordBoundaryRules?

optional wordBoundaryRules: WordBoundaryRules

Specifies the word breaking algorithm. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.


wrapMode?

optional wrapMode: WrapMode

Specifies how text lines are broken to avoid text overflowing the layout box. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.