I am trying to create a table based on an array of data, "tableData".
The number of rows will vary.
To create table you have to match the "alignments" data to the data.
I can not create an array with just .left, .center, or .right variables to match the data. They are not stings or ints, etc...
So how can I set the alignments rows to equal the data rows?
do {
try table.generateCells(
data:tableData,
alignments: [
[.center, .right, .right, .right],
[.center, .right, .right, .right],
[.center, .right, .right, .right],
[.center, .right, .right, .right]
]
)
}
It does not appear you can set all the rows with a single entry. Has to be array with matching numbers of row.
https://github.com/Techprimate/TPPDF
Thank you.