/**
  * Processes the pdf using the input and output that have been set.
  */
 public function process()
 {
     if (null !== $this->cache) {
         $contents = $this->input->process();
         if (!($output = $this->cache->load(md5($contents)))) {
             $this->cache->save($output = $this->output->process($contents, $this->generator));
         }
     } else {
         $output = $this->output->process($this->input->process(), $this->generator);
     }
     return $output;
 }