src/Filter/Unoconv/Convert.php
public function process(ThingInterface $thing, $sourcePath, OptionsInterface $options = null)
    {
        $tmpDir  = $this->tmpFs->createTemporaryDirectory();
        $tmpFile = $tmpDir.DIRECTORY_SEPARATOR.$thing->getKey();

        /** @var DocumentOptions $options */
        $options = $this->defaults->merge($options);

        $pb      = $this->unoconv->getProcessBuilder()
            ->format($options->getFormat())
            ->output($tmpFile)
            ->input($sourcePath);
        $process = $pb->getProcess();

        $code = $process->run();
        if ($code !== 0) {
            throw ProcessingFailedException::create(
                'Failed to convert document to PDF',
                $code,
                $process->getOutput(),
                $process->getErrorOutput()
            );
        }

        return [$tmpFile];
    }
public function process(ThingInterface $thing, $sourcePath, OptionsInterface $options = null)
    {
        $tmpDir  = $this->tmpFs->createTemporaryDirectory();
        $tmpFile = $tmpDir.DIRECTORY_SEPARATOR.$thing->getKey();

        /** @var DocumentOptions $options */
        $options = $this->defaults->merge($options);

        $pb      = $this->unoconv->getProcessBuilder()
            ->format($options->getFormat())
            ->output($tmpFile)
            ->input($sourcePath);
        $process = $pb->getProcess();

        $code = $process->run();
        if ($code !== 0) {
            throw ProcessingFailedException::create(
                'Failed to convert document to PDF',
                $code,
                $process->getOutput(),
                $process->getErrorOutput()
            );
        }

        return [$tmpFile];
    }
@param ThingInterface                                              $thing
@param string                                                      $sourcePath
@param \Asoc\Dadatata\Filter\OptionsInterface|null|DocumentOptions $options

@throws \Asoc\Dadatata\Exception\ProcessingFailedException
@return array Paths to generated files