2017 © Pedro Peláez
 

library tika

libs for tika wrapper

image

funstaff/tika

libs for tika wrapper

  • Wednesday, March 9, 2016
  • by Garfield-fr
  • Repository
  • 2 Watchers
  • 11 Stars
  • 12,757 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Tika

Master: Build Status, (*1)

A wrapper php for Tika binary, (*2)

Installation

To install tika with Composer just run:, (*3)

$ php composer.phar require funstaff/tika dev-master

Usage

<?php

use Funstaff\Tika\Configuration;
use Funstaff\Tika\Document;
use Funstaff\Tika\Wrapper;

$config = new Configuration('/path/to/tika.jar');
$config
    ->setOutputFormat('html')
    ->setOutputEncoding('UTF-8');

$wrapper = new Wrapper($config);
$wrapper
    ->addDocument(new Document('doc.pdf','/path/to/document.pdf'))
    ->addDocument(new Document('doc2.pdf','/path/to/document2.pdf'))
    ->execute();

/* Get All documents */
$documents = $wrapper->getDocument();

/* or only one document */
$document = $wrapper->getDocument('doc.pdf');

/* Get Document content */
$content = $document->getContent();

/* or raw content (output of Tika) */
$content = $document->getRawContent();

/* Get All Metadata for document (only on xml and html output format) */
$metadata = $document->getMetadata();

/* Get Value for metadata */
$author = $metadata->get('author');

Credits

To all users that gave feedback and committed code https://github.com/Funstaff/Tika., (*4)

© Bertrand Zuchuat - Funstaff, (*5)

The Versions

09/03 2016

dev-master

9999999-dev https://github.com/Funstaff/Tika/

libs for tika wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

tika