PHP Classes

How to Convert DOC to TXT using PHP DOC DOCX PDF to Text Converter: Convert DOCX, DOC, PDF to plain text

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (18)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 57%Total: 5,791 All time: 403 This week: 107Up
Version License PHP version Categories
filetotext 1.0The PHP License5.2PHP 5, Text processing, Conversion


This class can convert DOCX, DOC, PDF files to plain text.

It can read files in either Microsoft Word DOCX and DOC formats or PDF and parse the files to extract text they contain.

The text extracted from the documents is returned as a plain text string.


Extract PDF to text and XML
I need to parse a PDF file and convert whole text into XML

What is the best PHP pdf to text class?
pdf to text format in php

What is the best PHP count characters class?
Get number of characters in a uploaded doc, txt, odt, pdf etc

Innovation Award
PHP Programming Innovation award nominee
November 2014
Number 3

Prize: One copy of VS.PHP
File formats like Microsoft Word DOC or PDF are used to create documents that may contain text and other types of document elements.

Parsing and extracting the document elements from files in those formats, usually is not a trivial task. However, if you just want to extract the text in the document, simpler approaches may be used.

This class can extract text from PDF document files as well Microsoft Word files, including the older versions that use a binary file format.

Manuel Lemos
Picture of Aditya Sarkar
  Performance   Level  
Name: Aditya Sarkar <contact>
Classes: 2 packages by
Country: India India
Age: 32
All time rank: 48927 in India India
Week rank: 333 Up35 in India India Down
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file class.filetotext.php Class main class file
Plain text file index.php Example example to call

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:403
This week:107Up
User Ratings User Comments (6)
 All time
This one was very useful, i managed an email box crawler, inc...
5 years ago (Vincent DECARPIGNY)
I need to extract text from PDF.
6 years ago (Erwin Moller)
I need to extract text from PDF.
6 years ago (Erwin Moller)
Does not work reliably with PDF.
7 years ago (goodbee)
Very interesting class.
8 years ago (Everton da Rosa)
on peut simplifier juste ceci : return $this->{"read_$file_ex...
8 years ago (Yves Marie HAMAYON)