Skip to content
Snippets Groups Projects
Select Git revision
  • f1eba1aa763efd39ad610438e1211a65f11bbe0c
  • master default protected
  • release-1.3.10
  • popover-bootstrap-3.4
  • zf-3.x
  • 3.0.9
  • 3.0.8
  • 1.3.10
  • 3.0.7
  • 3.0.6
  • 3.0.5
  • 3.0.4
  • 3.0.3
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 1.3.9
  • 1.3.8
  • 1.3.7
  • 1.3.6
  • 1.3.5
  • 1.3.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
25 results

autoload_classmap.php

Blame
  • Forked from lib / unicaen / auth
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    PdfMergeShellCommandQpdf.php 974 B
    <?php
    
    namespace UnicaenPdf\Command;
    
    use UnicaenPdf\Command\PdfMergeShellCommandInterface;
    use UnicaenShell\Command\ShellCommand;
    
    /**
     * Commande de concaténation de N fichiers PDF.
     *
     * Version utilisant 'qpdf'.
     */
    final class PdfMergeShellCommandQpdf extends ShellCommand implements PdfMergeShellCommandInterface
    {
        public function getName(): string
        {
            return 'MergeShellCommandQpdf';
        }
    
        public function checkRequirements(): void
        {
            $this->assertExecutableExists();
        }
    
        public function generateCommandLine()
        {
            // Commande de fusion (cf. https://qpdf.readthedocs.io/en/10.5/cli.html#page-selection-options)
            $command = $this->executable .
                sprintf(' --warning-exit-0 %s --pages . %s -- %s',
                    array_shift($this->inputFilesPaths),
                    implode(' ', $this->inputFilesPaths),
                    $this->outputFilePath
                );
    
            $this->commandLine = $command;
        }
    }