Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6972799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:01:03+00:00 2026-05-27T17:01:03+00:00

I need to extract plain text from uploaded documents in order to make them

  • 0

I need to extract plain text from uploaded documents in order to make them searchable. Documents could be MS Word or pdf (either scanned or containing text). The application in question is running on a LAMP stack, but installing other software could be an option. Is there any tool, service, library or combination of those that you could recommend to accomplish this task?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:01:04+00:00Added an answer on May 27, 2026 at 5:01 pm

    You can use a combination of shell utilities like pdftotext for PDFs, wvWare for DOCs, docx2txt.pl for DOCX’s, like the textractor rubygem does.

    # on Ubuntu
    apt-get install wv xpdf-utils links
    

    There are also native php classes for extracting PDF and docx.

    Another rubygem, which even does OCR for you though Tesseract, is docsplit.

    It might be a good idea to consider Solr for indexing and searching. You may use the Solr Cell plugin to index and search Word documents, PDF’s and more. I use it successfully in one of my projects. Solr Cell is based on several projects like Apache POI, Tika and PDFBox.

    The tricky part is to set up all the cell dependent jars and solr schema, and to figure out the indexing request parameters, but all can be thought out from the wiki documentation. Here’s my jars and schema to get you started, the relevant part of the schema is the line containing “attachment”.

    Solr Cell does not do OCR, though. You will have to use an OCR Engine first to make them searchable.

    For OCR you can use the OpenSource Engine Tesseract, which is developed by Google or you might want to have a look at the commercial engine Abbyy. Both come as commandline utils, which you can run from your php scripts. To get the comparable results from Tesseract as from Abbyy, you will have to do some pre- and postprocessing 1. There are also cloud services, which might be an easier option. For instance, Wisetrend and Abbyy Cloud. The latter is in beta at the moment, so it’s free of charge and it has ready-to-go PHP code samples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to extract and decode barcodes and text from images. Is there any
I need to extract multiple text/dropdown list fields from an asp.net form and format
I need to extract all the images from a PDF file on my server.
I am working on a VB6 project and I need to extract plain text
I need to extract text-only content from my thesis document written in LaTeX for
I'm trying to extract one or more urls from a plain text string in
I need to extract data from a .mpp file on the network and combine
I need to extract some bitmaps from an .msstyles file (the Windows XP visual
I need to extract the icon from a windows shortcut (.lnk) file (or find
I need to extract all MP3 titles from a fuzzy list in a list.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.