public function setOption($key, $value = null) {
    $globalOptions = $this->globalOptions;
    
    if($value) {
      $globalOptions[$key] = $value;
    } else {
      $globalOptions[] = $key;
    }

    $this->setGlobalOptions($globalOptions);
    $this->pdf = new Pdf($this->globalOptions);
  }