How to read a PDF File Using PHP ?

How to read a PDF File Using PHP and how to insert into MYSQL database

Page 1 of 1

1 Replies - 13809 Views - Last Post: 27 March 2008 - 02:03 PM Rate Topic: -----

#1 vrushalini  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-March 08

How to read a PDF File Using PHP ?

Posted 24 March 2008 - 12:27 AM

<?php
define('FPDF_FONTPATH','font/');
require('fpdi.php');

$pdf= new fpdi();
$pagecount = $pdf->setSourceFile("pdfdoc.pdf");

$tplidx = $pdf->ImportPage(1);

$pdf->addPage();
$pdf->useTemplate($tplidx,10,10,90);

$pdf->Output("newpdf.pdf","F");
?>
Is This A Good Question/Topic? 0
  • +

Replies To: How to read a PDF File Using PHP ?

#2 spullen  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 10
  • View blog
  • Posts: 356
  • Joined: 22-March 07

Re: How to read a PDF File Using PHP ?

Posted 27 March 2008 - 02:03 PM

Are you asking how to store the actual file in the database. If it is this I would not recommend it. A better way to store this information is store the file on disk somewhere, and store the file path to the location of the pdf in the database.
However if you are so inclined to store the file in the database, look up blobs and mysql on google, or "how to store files in the database", I'm sure this will be what you want.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1