ICIJ / node-tika

Apache Tika bridge for Node.js. Text and metadata extraction, language detection and more.
MIT License
140 stars 36 forks source link

`maxLength` parameter for #text. #9

Closed ProGM closed 9 years ago

ProGM commented 9 years ago

Hi! I added the maxLength option to text extraction. Now you can pass it as option to tika.text(...) in this way:

options = { maxLength: 15 }
tika.text('test/data/file.pdf', options, function(err, text) {
    console.log(text); // "First 15 charac"...
});

I needed it for my project, just sharing :)

mattcg commented 9 years ago

Thank you for a very complete pull request! :sparkles: Great work!