Jump to content

[SOLVED] simple FPDF does not work


kwstephenchan

Recommended Posts

Hi all,

I am new to FPDF and the following is a starter FPDF script but it does not work and I have no clue.

 

$pdf=new FPDF();

$pdf->SetTitle('Project Plan');

$pdf->SetFont('Helvetica','B',20);

$pdf->SetTextColor(50,60,100);

$pdf->AddPage('P');

$pdf->SetDisplayMode(real,'default');

$pdf->SetXY(50,20);

$pdf->SetDrawColor(50,50,100);

$pdf->Cell(100,10,'Installation Plan',1,0,'C',0);

$pdf->SetXY(10,50);

$pdf->SetFontSize(10);

$pdf->Write(5,'Congradulations! You have generated a PDF. ');

$pdf->Output('example1.pdf','I');

 

When I execute this php, I got error from IE as followiL

 

Internet Explorer cannot download rptproj02.php from localhost.

Internet Explorer cannot find site and something like that.

What I have done was to download FPDF, extract it and place the FPDF.php in my project directory (including some font file), was there something else that I should do ??

 

Please help.

KW

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.