def __init__(self, sheet_width, sheet_height, columns, rows, label_width, label_height, **kwargs):
        """
        Required parameters
        -------------------
        sheet_width, sheet_height: positive dimension
            The size of the sheet.

        columns, rows: positive integer
            The number of labels on the sheet.

        label_width, label_size: positive dimension
            The size of each label.

        Margins and gaps
        ----------------
        left_margin: positive dimension
            The gap between the left edge of the sheet and the first column.
        column_gap: positive dimension
            The internal gap between columns.
        right_margin: positive dimension
            The gap between the right edge of the sheet and the last column.
        top_margin: positive dimension
            The gap between the top edge of the sheet and the first row.
        row_gap: positive dimension
            The internal gap between rows.
        bottom_margin: positive dimension
            The gap between the bottom edge of the sheet and the last row.

        Padding
        -------
        left_padding, right_padding, top_padding, bottom_padding: positive dimensions, default 0
            The padding between the edges of the label and the area available
            to draw on.

        Corners
        ---------------------
        corner_radius: positive dimension, default 0
            Gives the labels rounded corners with the given radius.
        padding_radius: positive dimension, default 0
            Give the drawing area rounded corners. If there is no padding, this
            must be set to zero.

        Background
        ----------
        background_image: reportlab.graphics.shape.Image
            An image to use as the background to the page. This will be
            automatically sized to fit the page; make sure it has the correct
            aspect ratio.
        background_filename: string
            Filename of an image to use as a background to the page. If both
            this and background_image are given, then background_image will
            take precedence.

        Raises
        ------
        InvalidDimension
            If any given dimension is invalid (i.e., the labels cannot fit on
            the sheet).

        """
        # Compulsory arguments.
        self._sheet_width = Decimal(sheet_width)
        self._sheet_height = Decimal(sheet_height)
        self._columns = int(columns)
        self._rows = int(rows)
        self._label_width = Decimal(label_width)
        self._label_height = Decimal(label_height)

        # Optional arguments; missing ones will be computed later.
        self._left_margin = kwargs.pop('left_margin', None)
        self._column_gap = kwargs.pop('column_gap', None)
        self._right_margin = kwargs.pop('right_margin', None)
        self._top_margin = kwargs.pop('top_margin', None)
        self._row_gap = kwargs.pop('row_gap', None)
        self._bottom_margin = kwargs.pop('bottom_margin', None)

        # Optional arguments with default values.
        self._left_padding = kwargs.pop('left_padding', 0)
        self._right_padding = kwargs.pop('right_padding', 0)
        self._top_padding = kwargs.pop('top_padding', 0)
        self._bottom_padding = kwargs.pop('bottom_padding', 0)
        self._corner_radius = Decimal(kwargs.pop('corner_radius', 0))
        self._padding_radius = Decimal(kwargs.pop('padding_radius', 0))
        self._background_image = kwargs.pop('background_image', None)
        self._background_filename = kwargs.pop('background_filename', None)

        # Leftover arguments.
        if kwargs:
            args = kwargs.keys()
            if len(args) == 1:
                raise TypeError("Unknown keyword argument {}.".format(args[0]))
            else:
                raise TypeError("Unknown keyword arguments: {}.".format(', '.join(args)))

        # Track which attributes have been automatically set.
        self._autoset = set()

        # Check all the dimensions etc are valid.
        self._calculate()