src/Pdf.php
public function setOptions($options = array())
    {
        // #264 tmpDir must be set before calling ensureUrlOrFileOptions
        if (isset($options['tmpDir'])) {
            $this->tmpDir = $options['tmpDir'];
            unset($options['tmpDir']);
        }
        $options = $this->ensureUrlOrFileOptions($options);
        foreach ($options as $key => $val) {
            if (is_int($key)) {
                $this->_options[] = $val;
            } elseif ($key[0] !== '_' && property_exists($this, $key)) {
                $this->$key = $val;
            } else {
                $this->_options[$key] = $val;
            }
        }
        return $this;
    }
public function setOptions($options = array())
    {
        // #264 tmpDir must be set before calling ensureUrlOrFileOptions
        if (isset($options['tmpDir'])) {
            $this->tmpDir = $options['tmpDir'];
            unset($options['tmpDir']);
        }
        $options = $this->ensureUrlOrFileOptions($options);
        foreach ($options as $key => $val) {
            if (is_int($key)) {
                $this->_options[] = $val;
            } elseif ($key[0] !== '_' && property_exists($this, $key)) {
                $this->$key = $val;
            } else {
                $this->_options[$key] = $val;
            }
        }
        return $this;
    }
Set global option(s)

@param array $options list of global PDF options to set as name/value pairs
@return static the Pdf instance for method chaining