smalot / pdfparser

PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
GNU Lesser General Public License v3.0
2.42k stars 538 forks source link

get the output like the demo shows #154

Open itaims opened 7 years ago

itaims commented 7 years ago

How can i achieve output like the demo shows here: http://www.pdfparser.org/demo

I want to read in new line. which demo shows. Can i get the demo code or demo source to achieve this.

Awaiting for your reply,

Thanks,

itaims commented 7 years ago

Its solved... Its coming with '\n' so i used nl2br function and its working.

mchoubby commented 7 years ago

how you did it?

4044ever commented 6 years ago

I had the same question..... This works, see the old and new code:


//$text = $pdf->getText();
//echo $text;

$text=nl2br($pdf->getText());
echo $text;```
pranay2206 commented 5 years ago

Getting the following error

Fatal error: Uncaught Error: Call to undefined function n12br() in C:\xampp\htdocs\pranay\pdfcon.php:29 Stack trace: #0 {main} thrown in C:\xampp\htdocs\pranay\pdfcon.php on line 2