davidgohel / flextable

table farming
https://ardata-fr.github.io/flextable-book/
565 stars 82 forks source link

Fixed fit_to_width: max_iter was ignored #562

Closed pteridin closed 1 year ago

pteridin commented 1 year ago

fit_to_width was previously a loop that ignored the parameter max_iter. That lead to infinite looping and refitting the table.

Also, on the first glance: The function seems to allow negative values in font-size. Should that be fixed as well?

davidgohel commented 1 year ago

Good catch, thank you! Thanks also about the possible negative font size, don't worry, I will add a warning/return if that happens.