finbarrmccarthy / tika
There is no license information available for the latest version (dev-master) of this package.
A wrapper for Tika in ZF2
dev-master
2014-01-21 15:12 UTC
Requires
- php: >=5.3.2
- symfony/process: ~2.1
This package is not auto-updated.
Last update: 2025-02-11 08:59:12 UTC
README
This is a ZF2 Wrapper for Apache Tika.
It allows you to retrieve text, metadata and language from complex documents.
Supported formats
It supports opendocument, office .doc and .docx, pdf, images, videos and a lot more !
See http://tika.apache.org/1.1/formats.html for details.
Install with composer
Add the package dependency finbarrmccarthy/tika
in your composer.json
{
"require": {
"finbarrmccarthy/tika": "@dev"
}
}
Install with composer
php composer.phar install
Usage
In your own project, assuming you have an opendocument test.odt in the current directory
<?php
use FinbarrMcCarthy\Lib\Tika\TikaApp;
$testFile = new \SplFileInfo(__DIR__."/yourdocument.pdf");
$tikaApp = new TikaApp();
$plaintext = $tikaApp->getText($testFile);
$metadataArray = $tikaApp->getMetaData($testFile);
$language = $tikaApp->getLanguage($testFile);