diff --git a/Tasks/PdfBuilder.cs b/Tasks/PdfBuilder.cs index fbd5bc0..659d66b 100644 --- a/Tasks/PdfBuilder.cs +++ b/Tasks/PdfBuilder.cs @@ -615,22 +615,25 @@ public class PdfBuilder int bundleOnPallet2 = (secondIndex % Settings._instance.pdfExport.rsBundNrPal) + 1; - DrawGermanyRunningSheet( - gfx, - marginX, - top2, - usableW, - tableH, - list, - grouped_nums[secondIndex], - grouped_nums, - fontLabel, - fontText, - fontBig, - palletNumber2, - bundleOnPallet2, - secondIndex + 1 - ); + if (firstIndex + 1 < grouped_nums.Count) + { + DrawGermanyRunningSheet( + gfx, + marginX, + top2, + usableW, + tableH, + list, + grouped_nums[secondIndex], + grouped_nums, + fontLabel, + fontText, + fontBig, + palletNumber2, + bundleOnPallet2, + secondIndex + 1 + ); + } } document.Save(path);