silverstripe-textextraction/docs/en/developer-docs.md
2015-11-07 14:06:23 +13:00

433 B

Developer documentation

Usage

Manual extraction:

$myFile = '/my/path/myfile.pdf';
$extractor = FileTextExtractor::for_file($myFile);
$content = $extractor->getContent($myFile);

Extraction with FileTextExtractable extension applied:

$myFileObj = File::get()->First();
$content = $myFileObj->getFileContent();

This content can also be embedded directly within a template.

$MyFile.FileContent