protected function setDocumentSettings(
        BasePageDocument $document,
        $format,
        $data,
        $overrideSettings
    ) {
        if ('true' !== $overrideSettings) {
            return;
        }

        foreach ($data as $key => $property) {
            $setter = 'set' . ucfirst($key);

            if (in_array($key, self::$excludedSettings) || !method_exists($document, $setter)) {
                continue;
            }

            $value = $this->getParser($format)->getPropertyData(
                $key,
                $data
            );

            $document->$setter($this->getSetterValue($key, $value));
        }
    }