mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
use configuration pdftotext binary
This commit is contained in:
@@ -115,6 +115,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormTypeInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\Process\ExecutableFinder;
|
||||
use Unoconv\UnoconvServiceProvider;
|
||||
use XPDF\PdfToText;
|
||||
use XPDF\XPDFServiceProvider;
|
||||
@@ -237,8 +238,19 @@ class Application extends SilexApplication
|
||||
|
||||
$this->register(new UnicodeServiceProvider());
|
||||
$this->register(new ValidatorServiceProvider());
|
||||
$this->register(new XPDFServiceProvider());
|
||||
|
||||
if ($this['configuration.store']->isSetup()) {
|
||||
$binariesConfig = $this['conf']->get(['main', 'binaries']);
|
||||
$executableFinder = new ExecutableFinder();
|
||||
$this->register(new XPDFServiceProvider(), [
|
||||
'xpdf.configuration' => [
|
||||
'pdftotext.binaries' => isset($binariesConfig['pdftotext_binary']) ? $binariesConfig['pdftotext_binary'] : $executableFinder->find('pdftotext'),
|
||||
]
|
||||
]);
|
||||
|
||||
$this->setupXpdf();
|
||||
}
|
||||
|
||||
$this->register(new FileServeServiceProvider());
|
||||
$this->register(new ManipulatorServiceProvider());
|
||||
$this->register(new PluginServiceProvider());
|
||||
|
Reference in New Issue
Block a user