Skip to content

Add type checking for fixed column widths#2921

Closed
axoking wants to merge 2 commits intobpampuch:masterfrom
axoking:master
Closed

Add type checking for fixed column widths#2921
axoking wants to merge 2 commits intobpampuch:masterfrom
axoking:master

Conversation

@axoking
Copy link
Copy Markdown

@axoking axoking commented Mar 4, 2026

When you accidentally use a string with a number as a table column width (like "690" instead of 690), pdfmake used to ignore that and then later throwed an error when trying to calculate something with that wrong length.

It used to look like this:

Error: unsupported number: 45690939.433593759012.087890625

Now, when evaluating the column widths, pdfmake checks if the widths are really numbers, and if not, it throws an error message like this:

Error: Invalid column width: 690 (width must be a number, "*" or "auto")

@axoking axoking marked this pull request as draft March 5, 2026 14:36
@axoking axoking marked this pull request as ready for review March 5, 2026 14:47
@axoking axoking marked this pull request as draft March 6, 2026 07:32
@axoking axoking closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant