File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 66- Update linebreak to 1.1
77- Add support for spot colors
88- Add support to scale text horizontally
9+ - Add an option to keep the indentation after a new line starts and allow to indent a whole paragraph/text element
910- Fix sets tab order to "Structure" when a document is tagged
1011- Fix font cache collision for fonts with missing postscript name or bad TTF metadata
1112- Fix measuring text when OpenType features are passed in to .text()
Original file line number Diff line number Diff line change 9090* ` columns ` - the number of columns to flow the text into
9191* ` columnGap ` - the amount of space between each column (1/4 inch by default)
9292* ` indent ` - the amount in PDF points (72 per inch) to indent each paragraph of text
93+ * ` indentAllLines ` - wheter to indent all lines of a paragraph (` false ` by default - indents only the first line)
9394* ` paragraphGap ` - the amount of space between each paragraph of text
9495* ` lineGap ` - the amount of space between each line of text
9596* ` wordSpacing ` - the amount of space between each word in the text
Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ class LineWrapper extends EventEmitter {
4040 this . document . x += indent ;
4141 this . lineWidth -= indent ;
4242
43+ // if indentAllLines is set to true
44+ // we're not resetting the indentation for this paragraph after the first line
45+ if ( options . indentAllLines ) {
46+ return ;
47+ }
48+
49+ // otherwise we start the next line without indent
4350 return this . once ( 'line' , ( ) => {
4451 this . document . x -= indent ;
4552 this . lineWidth += indent ;
You can’t perform that action at this time.
0 commit comments