TextColumnsNEW
TextColumns:
type TextColumns =The text columns of a section.
Type Declaration
Section titled “Type Declaration”{ type: "equal"; count: number; spacing: number; separator: boolean; }
type:
"equal"
count:
number
The number of columns, an integer from 1 to 45.
spacing
Section titled “spacing”spacing:
number
The space between two adjacent columns, in points.
separator
Section titled “separator”separator:
boolean
Whether a vertical line separates adjacent columns.
{ type: "custom"; columns: TextColumn[]; separator: boolean; }
type:
"custom"
columns
Section titled “columns”columns:
TextColumn[]
Between 1 and 45 columns, from left to right.
separator
Section titled “separator”separator:
boolean
Whether a vertical line separates adjacent columns.
Remarks
Section titled “Remarks”Text fills a section’s first column from top to bottom, then the column to its right.
'equal' columns are count columns of the same width. 'custom' columns list each
column with its own width. All values are in points (1 point = 1/72 inch).
Each 'equal' column is (textWidth - spacing * (count - 1)) / count wide, where
textWidth is the page width minus the left and right page margins. A section without
columns has one 'equal' column.
PageSetup.textColumns reads a section’s columns, and
PageSetup.setTextColumns changes them.
Examples
Section titled “Examples”Two columns of the same width, half an inch apart, with a line between them:
section.pageSetup().setTextColumns({ type: 'equal', count: 2, spacing: 36, separator: true });A narrow and a wide column that fill the 468-point text width of a US Letter page with 1-inch margins:
section.pageSetup().setTextColumns({ type: 'custom', columns: [ { width: 144, spaceAfter: 36 }, { width: 288, spaceAfter: 0 }, ], separator: false,});