protected function createPdf() {
    if ($this->_isCreated) {
      return FALSE;
    }
    $command = $this->getCommand();
    $fileName = $this->getPdfFilename();

    $command->addArg('merge');
    foreach ($this->_options as $key => $option) {
      if (is_int($key)) {
        $command->addArg($option);
      }
      else {
        $command->addArg($key, $option, TRUE);
      }
    }
    foreach ($this->_objects as $object) {
      $command->addArg($object['key'], $object['value'], TRUE);
    }
    $command->addArg('--output', $fileName, TRUE);
    if (!$command->execute()) {
      $this->_error = $command->getError();
      if (!(file_exists($fileName) && filesize($fileName) !== 0 && $this->ignoreWarnings)) {
        return FALSE;
      }
    }
    $this->_isCreated = TRUE;
    return TRUE;
  }
protected function createPdf() {
    if ($this->_isCreated) {
      return FALSE;
    }
    $command = $this->getCommand();
    $fileName = $this->getPdfFilename();

    $command->addArg('merge');
    foreach ($this->_options as $key => $option) {
      if (is_int($key)) {
        $command->addArg($option);
      }
      else {
        $command->addArg($key, $option, TRUE);
      }
    }
    foreach ($this->_objects as $object) {
      $command->addArg($object['key'], $object['value'], TRUE);
    }
    $command->addArg('--output', $fileName, TRUE);
    if (!$command->execute()) {
      $this->_error = $command->getError();
      if (!(file_exists($fileName) && filesize($fileName) !== 0 && $this->ignoreWarnings)) {
        return FALSE;
      }
    }
    $this->_isCreated = TRUE;
    return TRUE;
  }
protected function createPdf ( ) { if ( $ this -> _isCreated ) { return FALSE ; } $ command = $ this -> getCommand ( ) ; $ fileName = $ this -> getPdfFilename ( ) ; $ command -> addArg ( 'merge' ) ; foreach ( $ this -> _options as $ key => $ option ) { if ( is_int ( $ key ) ) { $ command -> addArg ( $ option ) ; } else { $ command -> addArg ( $ key , $ option , TRUE ) ; } } foreach ( $ this -> _objects as $ object ) { $ command -> addArg ( $ object [ 'key' ] , $ object [ 'value' ] , TRUE ) ; } $ command -> addArg ( '--output' , $ fileName , TRUE ) ; if ( ! $ command -> execute ( ) ) { $ this -> _error = $ command -> getError ( ) ; if ( ! ( file_exists ( $ fileName ) && filesize ( $ fileName ) !== 0 && $ this -> ignoreWarnings ) ) { return FALSE ; } } $ this -> _isCreated = TRUE ; return TRUE ; }
Run the Command to create the tmp PDF file

@return bool whether creation was successful
Run the Command to create the tmp PDF file