Welcome to Dream.In.Code
Become a PHP Expert!

Join 136,926 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,833 people online right now. Registration is fast and FREE... Join Now!




How to read a PDF File Using PHP ?

 
Reply to this topicStart new topic

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

vrushalini
23 Mar, 2008 - 11:27 PM
Post #1

New D.I.C Head
*

Joined: 23 Mar, 2008
Posts: 1

<?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");
?>
User is offlineProfile CardPM
+Quote Post

spullen
RE: How To Read A PDF File Using PHP ?
27 Mar, 2008 - 01:03 PM
Post #2

D.I.C Regular
Group Icon

Joined: 22 Mar, 2007
Posts: 330



Thanked: 1 times
Dream Kudos: 50
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:27PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month