I want to read pdf file in php and store the content in the variable without installing anything.
I am able to read doc file and .txt file but i am getting some special characters when i read pdf file.
I want to read pdf file in php and store the content in the variable without installing anything.
I am able to read doc file and .txt file but i am getting some special characters when i read pdf file.
You can read about useful information in reading PDF in PHP in following Links -
1: http://webcheatsheet.com/php/reading_clean_text_from_pdf.php
Hope this will help you.
you can use fpdf as well as FPDI for this purpose
Here is the sample code of FPDI which you can find on their website as well as further support
<?php
require_once('fpdf.php');
require_once('fpdi.php');
$pdf = new FPDI();
$pagecount = $pdf->setSourceFile('TestDoc.pdf');
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->addPage();
$pdf->useTemplate($tplidx, 10, 10, 90);
$pdf->Output('newpdf.pdf', 'D');>
//further user code
You can also get some help from this blog