← Back to team overview

mahara-contributors team mailing list archive

[Bug 1871515] A change has been merged

 

Reviewed:  https://reviews.mahara.org/10869
Committed: https://git.mahara.org/mahara/mahara/commit/c12c87dc466d6384113d0f2e1760064d901b9ab9
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit c12c87dc466d6384113d0f2e1760064d901b9ab9
Author: Mitsuhiro Yoshida <mits@xxxxxxxxxxx>
Date:   Wed Apr 8 10:54:00 2020 +0900

Bug 1871515: pdfunite and ghostscript availability check for RHEL/CentOS

Change-Id: I8627d9c42323a85d65d7a50c16ae6c54a082f956

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1871515

Title:
  pdfunite and ghostscript availability check for RHEL/CentOS

Status in Mahara:
  In Progress

Bug description:
  Adding the following code, we can check pdfunite and ghostscript
  installation on Red Hat Enterprise Linux (RHEL) and CentOS
  environment.

  File to modify:
  export/pdf/lib.php

  Line:
  80

  [Before]
      public static function has_pdf_combiner() {
          // Check we have a valid way to combine pdfs
          $combiner = false;
          if ($pdfunite = exec('apt-cache policy poppler-utils | grep Installed')) {
              if (!preg_match('/Installed\: \(none\)/', $pdfunite)) {
                  $combiner = 'pdfunite';
              }
          }
          if ($ghostscript = exec('apt-cache policy ghostscript | grep Installed')) {
              if (!preg_match('/Installed\: \(none\)/', $ghostscript)) {
                  $combiner = 'ghostscript';
              }
          }
          return $combiner;
      }

  [After]
      public static function has_pdf_combiner() {
          // Check we have a valid way to combine pdfs
          $combiner = false;
          if ($pdfunite = exec('apt-cache policy poppler-utils | grep Installed')) {
              if (!preg_match('/Installed\: \(none\)/', $pdfunite)) {
                  $combiner = 'pdfunite';
              }
          }
          if ($ghostscript = exec('apt-cache policy ghostscript | grep Installed')) {
              if (!preg_match('/Installed\: \(none\)/', $ghostscript)) {
                  $combiner = 'ghostscript';
              }
          }
          if ($pgtune = exec('rpm -q poppler-utils')) {
              $combiner = 'pdfunite';
          }
          if ($pgtune = exec('rpm -q ghostscript')) {
              $combiner = 'ghostscript';
          }
          return $combiner;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1871515/+subscriptions


References