fpdi help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
willkenson
Forum Newbie
Posts: 2
Joined: Sun Jun 10, 2007 4:21 pm

fpdi help

Post by willkenson »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi
I'm only an amature php'er, tho I have always been able to figure out how to do what i need to do by searching online.

but i just put on fpdf and fpdi, and am trying to load a pdf to use as a template like it sais to:

Code: Select all

require('fpdf.php');
require('fpdi.php');   
   
$pdf= new fpdi();
$pagecount = $pdf->setSourceFile("testpdf2.pdf");

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

$pdf->addPage();
$pdf->useTemplate($tplidx,0,0,643,890);

$pdf->Output("newpdf.pdf","D");


but all i get is: "FPDF error: Template does not exist!"

Can I only use files created by php as templates ? if so that will hurt me as this pdf has fancy graphics drawn all over it and would take me forever to re-write :/


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

seek the documentation and support offered by the specific library.
willkenson
Forum Newbie
Posts: 2
Joined: Sun Jun 10, 2007 4:21 pm

Post by willkenson »

ole wrote:seek the documentation and support offered by the specific library.
thats half the problem, i can't find hardly any support at all from their website, and the fdpi zip file didn't have any documentation at all, just the php files.
Post Reply