Snaking columns

Snaking columns (or newspaper-style columns) are a column layout mode where content flows vertically through the first column, then continues at the top of the next column, alternating direction as needed. Instead of always restarting at the top for each new row of columns, the layout “snakes” through the available columns in a continuous reading order.

When snakingColumns: true is enabled, only the first column should contain content. Subsequent columns serve as empty placeholders for overflow.

var docDefinition = {
    content: [
        {
            columns: [
                {text: myLongContent, width: '*'},  // Content goes here
                {text: '', width: '*'},             // Empty overflow target
                {text: '', width: '*'}              // Empty overflow target
            ],
            snakingColumns: true
        }
    ]
};

Nesting a “snaking column” directly inside another “snaking column” (a recursive snaking layout) is not supported.

Recommendation: