Skip to content

Commit ba98bf0

Browse files
pavel-alayitext-teamcity
authored andcommitted
Update auto table layout: improve stability
DEVSIX-1252 Autoported commit. Original commit hash: [751ace5]
1 parent c122ba3 commit ba98bf0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

itext/itext.layout/itext/layout/renderer/TableWidths.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ internal float[] AutoLayout() {
302302
if (!fixedTableWidth) {
303303
float tableWidthBasedOnPercents = sumOfPercents < 100 ? totalNonPercent * 100 / (100 - sumOfPercents) : 0;
304304
for (int i = 0; i < numberOfColumns; i++) {
305-
if (widths[i].isPercent) {
305+
if (widths[i].isPercent && widths[i].width > 0) {
306306
tableWidthBasedOnPercents = Math.Max(widths[i].max * 100 / widths[i].width, tableWidthBasedOnPercents);
307307
}
308308
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2e7ce2fb591c8019f9651c66cbf53ac16c199416
1+
751ace58eb7ba47dcf399ed44ec2e0c3224766c8

0 commit comments

Comments
 (0)