DsPdfJS API - v9.1.0
    Preparing search index...

    Type Alias LayoutProperties

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

    type LayoutProperties = {
        addSpacingAfterLastLine?: boolean;
        allowOverhangingWords?: boolean;
        baseLayout?: Layout | null;
        canSkipFirstLineWithIndentation?: boolean;
        columnWidth?: number | null;
        defaultFormat?: Format | null;
        defaultTabSize?: number;
        delimiterCharCode?: number;
        delimiterCharCount?: number;
        ellipsisCharCode?: number;
        firstLineIndent?: number;
        firstLineIsStartOfParagraph?: boolean;
        flowDirection?: FlowDirection;
        fontCollection?: FontCollection | null;
        fontFallbackScope?: FontFallbackScope;
        fontScaleFactor?: number;
        honorIdeographicBaseline?: boolean;
        honorLastLineSpacing?: boolean;
        honorTrailingLineBreak?: boolean;
        justifiedSpaceExtension?: number;
        justifiedSpaceShrinking?: number;
        justifiedTextExtension?: number;
        justifyLastLine?: boolean;
        lastLineIsEndOfParagraph?: boolean;
        lineBreakingRules?: LineBreakingRules;
        lineGapBeforeFirstLine?: boolean;
        linesBetweenConsecutiveHyphens?: number;
        lineSpacingScaleFactor?: number;
        marginAll?: number;
        marginBottom?: number;
        marginLeft?: number;
        marginRight?: number;
        marginTop?: number;
        maxHeight?: number | null;
        maxLastLineOverflowFactor?: number;
        maxWidth?: number | null;
        minimalLineSpacing?: number | null;
        paragraphAlignment?: ParagraphAlignment;
        paragraphSpacing?: number;
        restrictedFontLookup?: boolean;
        rightToLeft?: boolean;
        rotateSidewaysCounterclockwise?: boolean;
        rowHeight?: number | null;
        runs?: RunProperties[];
        softHyphenReplacementCharCode?: number;
        suppressShaping?: boolean;
        tabStops?: TabStop[] | null;
        textAlignment?: TextAlignment;
        textExtensionStrategy?: TextExtensionStrategy;
        trimmingGranularity?: TrimmingGranularity;
        uniformLineSpacing?: number | null;
        useEmbeddableFonts?: boolean;
        wordBoundaryRules?: WordBoundaryRules;
        wrapMode?: WrapMode;
    }
    Index

    Properties

    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?: 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?: Layout | null

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

    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?: 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?: 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?: number

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

    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?: 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?: 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?: 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?: 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?: 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?: FontCollection | null

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

    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?: 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?: 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?: 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?: 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?: 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?: 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?: 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?: 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?: 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?: LineBreakingRules

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

    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?: 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?: 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?: number

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

    marginBottom?: number

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

    marginLeft?: number

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

    marginRight?: number

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

    marginTop?: number

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

    maxHeight?: number | null

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

    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?: number | null

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

    minimalLineSpacing?: number | null

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

    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?: number

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

    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?: 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?: 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?: 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?: RunProperties[]

    The array of text runs to apply layout.

    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?: 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?: TabStop[] | null

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

    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?: TextExtensionStrategy

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

    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?: number | null

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

    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?: WordBoundaryRules

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

    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.