public function generate()
    {
        $output = $this->outputDir."/".preg_replace("/\.pdf$/", "", basename($this->file)).".html";
        $options = $this->generateOptions();

        if (PHP_OS === 'WINNT') {
            $command = '"'.$this->bin().'" '.$options.' "'.$this->file.'" "'.$output.'"';
        }
        else {
            $command = $this->bin()." ".$options." '".$this->file."' '".$output."'";
        }

        exec($command);

        return $this;
    }