Skip to content
Snippets Groups Projects
Select Git revision
  • dd7f090dbf7f3dffd143f701cb5ec0bc2b9e1b46
  • master default protected
  • ll-wf-finitions
  • ll-workflow
  • b24
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • 24.10
  • 24.9
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
41 results

NewEntityService.php

Blame
  • 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;
        }
    }