PHP Classes

My PDF to Text: Parse a PDF document to extract the text contents

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-02-08 (3 months ago) RSS 2.0 feedNot enough user ratingsTotal: 127 This week: 2All time: 9,399 This week: 34Up
Version License PHP version Categories
pdf-my-text 1.0.0MIT/X Consortium ...5PHP 5, Files and Folders, Text proces..., D..., P...


This class can parse a PDF document to extract the text contents.

It can take the file name of a PDF document as a parameter and parses the document file.

The class can extract the document's text and return it as a string.

This class convert PDF file to raw text which can be saved as .txt/.doc/.whatever or can be copied and pasted to anywhere.

Picture of The Algoslingers
  Performance   Level  
Name: The Algoslingers is available for providing paid consulting. Contact The Algoslingers .
Classes: 5 packages by
Country: Ghana Ghana
Age: ???
All time rank: 40255 in Ghana Ghana
Week rank: 30 Up1 in Ghana Ghana Up
Innovation award
Innovation award
Nominee: 1x


want to display a pdf file
want to display a pdf file in a web page


Download and add the PDFMyText class to your project.

Call the PDFMyText() class or see the index.php file for example usage.






$_FILES['file']['type']=="application/pdf") {

$a = new PDFMyText();





    else {

"<p style='color:red; text-align:center'>

            Wrong file format</p>

<!doctype html>
    <meta name="viewport" content="width=device-width"/>
    <title>PDF to TEXT < By @TheAlgoslingers</title>
  <body style="text-align:center;padding:15px">
    <form method="post" enctype="multipart/form-data">
      <input type="file" name="file" />
      <input type="submit" name="readpdf" value="Convert"/>

  Files folder image Files  
File Role Description
Plain text file class.pdfmytext.php Class Main class file
Accessible without login Plain text file index.php Example Example file

 Version Control Unique User Downloads Download Rankings  
This week:2
All time:9,399
This week:34Up