private function getRemainingColumnWidth(TcTable $table, $width) {
        if (!$this->maxWidth) {
            $margins = $table->getPdf()->getMargins();
            $content_width = $table->getPdf()->getPageWidth() - $margins['left'] - $margins['right'];
        } else {
            $content_width = $this->maxWidth;
        }
        $result = $content_width - (is_array($width) ? array_sum($width) : $width);
        return $result > 0 ? $result : 0;
    }