protected function _convertFileToPdf($inputFile = null, $outputFile = null) {
		$cfgUnoconv = $this->_getUnoconvConfig();
		if ($cfgUnoconv === false) {
			throw new InternalErrorException(__d('view_extension', 'Unoconv is not configured'));
		}

		if (!file_exists($inputFile)) {
			throw new InternalErrorException(__d('view_extension', 'Invalid input file for converting to PDF'));
		}

		if (empty($outputFile)) {
			throw new InternalErrorException(__d('view_extension', 'Invalid output file for converting to PDF'));
		}

		if (mime_content_type($inputFile) === 'application/pdf') {
			return false;
		}

		extract($cfgUnoconv);
		if ($timeout <= 0) {
			$timeout = 60;
		}
		$unoconvOpt = [
			'timeout' => $timeout,
			'unoconv.binaries' => $binaries,
		];
		$unoconv = Unoconv\Unoconv::create($unoconvOpt);
		$unoconv->transcode($inputFile, 'pdf', $outputFile);
		if (!file_exists($outputFile)) {
			throw new InternalErrorException(__d('view_extension', 'Error on creation PDF file'));
		}

		return true;
	}