pageMarginsPreset() {
        return new ArgHandler('Sheet.pageMarginsPreset')
            .case(() => {
                return this._pageMarginsPresetName;
            })
            .case(['nil'], () => {
                // Remove all preset overrides and exclude from sheet
                this._pageMarginsPresetName = undefined;

                // Remove all preset overrides
                this._pageMarginsNode.attributes = {};
                return this;
            })
            .case(['string'], presetName => {
                const checkPresetName = this._getCheckAttributeNameHelper(
                    'pageMarginsPreset', Object.keys(this._pageMarginsPresets));
                checkPresetName(presetName);

                // Change to new preset
                this._pageMarginsPresetName = presetName;

                // Remove all preset overrides
                this._pageMarginsNode.attributes = {};
                return this;
            })
            .case(['string', 'object'], (presetName, presetAttributes) => {
                if (this._pageMarginsPresets.hasOwnProperty(presetName)) {
                    throw new Error(`Sheet.pageMarginsPreset: The preset ${presetName} already exists!`);
                }

                // Validate preset attribute keys.
                const pageMarginsAttributeNames = [
                    'left', 'right', 'top', 'bottom', 'header', 'footer'];
                const isValidPresetAttributeKeys = _.isEqual(
                    _.sortBy(pageMarginsAttributeNames),
                    _.sortBy(Object.keys(presetAttributes)));
                if (isValidPresetAttributeKeys === false) {
                    throw new Error(`Sheet.pageMarginsPreset: Invalid preset attributes for one or key(s)! - "${Object.keys(presetAttributes)}"`);
                }

                // Validate preset attribute values.
                _.forEach((attributeValue, attributeName) => {
                    const attributeNumberValue = parseFloat(attributeValue);
                    if (_.isNaN(attributeNumberValue) || _.isNumber(attributeNumberValue) === false) {
                        throw new Error(`Sheet.pageMarginsPreset: Invalid preset attribute value! - "${attributeValue}"`);
                    }
                });

                // Change to new preset
                this._pageMarginsPresetName = presetName;

                // Remove all preset overrides
                this._pageMarginsNode.attributes = {};

                // Register the preset
                this._pageMarginsPresets[presetName] = presetAttributes;
                return this;
            })
            .handle(arguments);
    }
Set a new page margins preset by name and attributes object.
@param {string} presetName - The preset name.
@param {object} presetAttributes - The preset attributes.
@returns {Sheet} The sheet.