Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make readable text from a pdf file in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 780
    Comment on it

    If you want to show a pdf file with the readable text from it on the page you can achieve it by seeing the code below

    We will use a php library (pdfparser). This function will get the exact text as what you need

    http://www.pdfparser.org/

    Step 1: You need to download the library package from the location below:-

    https://github.com/smalot/pdfparser
    

    Step 2: Now the php page will go like this Once you have imported the files to your library then you need to select any pdf file exp menu.pdf, Page will take out the text from the pdf And the code will go like this:-

    <?php
    $parser = new \installpath\PdfParser\Parser(); //your file location of library 
    $pdf    = $parser->parseFile('menu.pdf');  
    $result = $pdf->getText();
    echo $result;//all text from menu.pdf
    

    Source : pdfparser

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: