Commit 65e80365fabe96553d8771eae18225d6f2066008
1 parent
3c79cecb
KTS-673
"The search algorithm needs some work" Updated. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7472 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
24 additions
and
2 deletions
search2/indexing/extractors/OOPresentationExtractor.inc.php
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -require_once('OOPDFTextExtractor.inc.php'); | 3 | +require_once('OOTextExtractor.inc.php'); |
| 4 | +require_once('PDFExtractor.inc.php'); | ||
| 4 | 5 | ||
| 5 | -class OOPresentationExtractor extends OOPDFTextExtractor | 6 | +class OOPresentationExtractor extends CompositeExtractor |
| 6 | { | 7 | { |
| 8 | + public function __construct() | ||
| 9 | + { | ||
| 10 | + $sourceExtractor = new OOPresentationToPDF(); | ||
| 11 | + $targetExtractor = new PDFExtractor(); | ||
| 12 | + parent::__construct($sourceExtractor, 'pdf', 'application/pdf', $targetExtractor, true); | ||
| 13 | + } | ||
| 14 | + | ||
| 7 | public function getDisplayName() | 15 | public function getDisplayName() |
| 8 | { | 16 | { |
| 9 | return _kt('OpenOffice Presentation Extractor'); | 17 | return _kt('OpenOffice Presentation Extractor'); |
| @@ -18,4 +26,18 @@ class OOPresentationExtractor extends OOPDFTextExtractor | @@ -18,4 +26,18 @@ class OOPresentationExtractor extends OOPDFTextExtractor | ||
| 18 | } | 26 | } |
| 19 | } | 27 | } |
| 20 | 28 | ||
| 29 | +class OOPresentationToPDF extends OOTextExtractor | ||
| 30 | +{ | ||
| 31 | + public function __construct() | ||
| 32 | + { | ||
| 33 | + parent::__construct('pdf'); | ||
| 34 | + $this->documentConverter = KT_DIR . '/bin/openoffice/pdfgen.py'; | ||
| 35 | + if (!is_file($this->documentConverter)) | ||
| 36 | + { | ||
| 37 | + $this->documentConverter = false; | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | + | ||
| 21 | ?> | 43 | ?> |
| 22 | \ No newline at end of file | 44 | \ No newline at end of file |