Skip to content

Commit 751ace5

Browse files
committed
Update auto table layout: improve stability
DEVSIX-1252
1 parent 2e7ce2f commit 751ace5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layout/src/main/java/com/itextpdf/layout/renderer/TableWidths.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ float[] autoLayout() {
284284
float tableWidthBasedOnPercents = sumOfPercents < 100
285285
? totalNonPercent * 100 / (100 - sumOfPercents) : 0;
286286
for (int i = 0; i < numberOfColumns; i++) {
287-
if (widths[i].isPercent) {
287+
if (widths[i].isPercent && widths[i].width > 0) {
288288
tableWidthBasedOnPercents = Math.max(widths[i].max * 100 / widths[i].width, tableWidthBasedOnPercents);
289289
}
290290
}

0 commit comments

Comments
 (0)