Do you know an alternative to Apache Tika in Java? This library is giving me problems and I need to resolve this ASAP. I will appreciate your advice.

Edit: Apache Tika is a library that is used for extract text from Office (Word, Excel, etc.) or PDF files

Edit 2: In that sense, the alternative library has to have this features:

  • Written in Java
  • Be able to extract text from Office or PDF files
  • It would be great if the input was a java.io.File object and the output was a String
  • Built as JAR file(s)
  • Published on Maven

Edit 3: I finally changed Tika for a simpler library using this code.I modified it using the last POI and PDFxStream libraries, and it worked like a charm. I will upload the result to my GitHub account whether it helps someone. Also, I will left this question open in case that alternative exists.

Edit 4: https://github.com/mariosotil/text-extractor

  • We will need much more information to give good recommendations here – asking for "a tool like X" is never giving enough details, even if linked. You should always list your requirements explicitly. Please see How to ask for an alternative to some software and the questions linked to it for details. – Izzy Apr 29 '15 at 11:25
  • 1
    Thank you for your advice. I will change my question. – Mario S Apr 29 '15 at 18:01
  • Isn't Tika used to be able to guess what is the type of the file based on its content? – android developer Jul 11 '19 at 17:49
  • @androiddeveloper Yes but for accurate results you need to add some library which a ton of other dependencies and ends up inflating your jar to oblivion. My uber jar file went from 16MB to almost 90MB just after adding tika-parsers library – chx101 Mar 28 '20 at 14:54
  • @chx101 Do you know of any good, small libraries that can guess the type of the file based on its content? Preferably InputStream as input, instead of file path. – android developer Mar 28 '20 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.