[]
DsPdfJS API / 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.
optionaladdSpacingAfterLastLine: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.
optionalallowOverhangingWords: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.
optionalbaseLayout:Layout|null
A reference to the Layout object to copy the initial data from.
optionalcanSkipFirstLineWithIndentation: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.
optionalcolumnWidth: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.
optionaldefaultFormat: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.
optionaldefaultTabSize:number
Spacing between the default tab stops, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionaldelimiterCharCode: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.
optionaldelimiterCharCount: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.
optionalellipsisCharCode: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.
optionalfirstLineIndent: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.
optionalfirstLineIsStartOfParagraph: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.
optionalflowDirection: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.
optionalfontCollection:FontCollection|null
The font collection used for searching fonts and font fallbacks. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalfontFallbackScope: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.
optionalfontScaleFactor: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.
optionalhonorIdeographicBaseline: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.
optionalhonorLastLineSpacing: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.
optionalhonorTrailingLineBreak: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.
optionaljustifiedSpaceExtension: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.
optionaljustifiedSpaceShrinking: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.
optionaljustifiedTextExtension: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.
optionaljustifyLastLine: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.
optionallastLineIsEndOfParagraph: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.
optionallineBreakingRules:LineBreakingRules
Specifies the line breaking algorithm. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionallineGapBeforeFirstLine: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.
optionallinesBetweenConsecutiveHyphens: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.
optionallineSpacingScaleFactor: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.
optionalmarginAll:number
Sets all margins of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmarginBottom:number
The bottom margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmarginLeft:number
The left margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmarginRight:number
The right margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmarginTop:number
The top margin of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmaxHeight:number|null
The height of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalmaxLastLineOverflowFactor: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.
optionalmaxWidth:number|null
The width of the layout box, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalminimalLineSpacing:number|null
The explicit minimal distance between lines, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalparagraphAlignment: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.
optionalparagraphSpacing:number
The additional spacing between paragraphs, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalrestrictedFontLookup: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.
optionalrightToLeft:boolean
The base direction for horizontal and sideways text. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalrotateSidewaysCounterclockwise:boolean
Indicates whether sideways text should be rotated counterclockwise. The default is false. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalrowHeight: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.
optionalruns:RunProperties[]
The array of text runs to apply layout.
optionalsoftHyphenReplacementCharCode: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.
optionalsuppressShaping: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.
optionaltabStops:TabStop[] |null
The array of custom tab stops. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionaltextAlignment: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.
optionaltextExtensionStrategy:TextExtensionStrategy
Specifies the rules used for justified text extension. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionaltrimmingGranularity:TrimmingGranularity
The text granularity used to trim text overflowing the layout box. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionaluniformLineSpacing:number|null
The explicit distance between lines, in graphic units. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionaluseEmbeddableFonts: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.
optionalwordBoundaryRules:WordBoundaryRules
Specifies the word breaking algorithm. Overrides the value from base Layout if LayoutProperties.baseLayout is specified.
optionalwrapMode: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.