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)