Jump to content

ayan.lee

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ayan.lee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hhmmmm...ok....i'll try error handling...im a newbie to PHP... anyway...tanx for the help..
  2. i am trying to create a sample report using pdf file...everytime i run my code...there is no error...but when i click the submit button...the pdf file won't appear...instead the window will display...."failed to load pdf document"...is there something with my code...or do i need to upgrade my pdf reader....please help me... :)here is my code: ----index.php--- <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PDF Example #1 - Picture Title & Description</title> <style type="text/css"> <!-- #apDiv1 { position:absolute; width:304px; height:48px; z-index:1; left: 268px; top: 40px; } #apDiv2 { position:absolute; width:220px; height:29px; z-index:1; left: 23px; top: 41px; } #apDiv3 { position:absolute; width:131px; height:26px; z-index:2; left: 637px; top: 33px; } #Layer1 { position:absolute; width:344px; height:257px; z-index:1; left: 437px; top: 101px; } body,td,th { font-family: Verdana; font-size: 14px; } .style1 { font-size: 24px; font-weight: bold; } --> </style> </head> <body> <form action="create.php" method="post" enctype="multipart/form-data"> <p align="center" class="style1">Join the fun! Add a title and description for this picture! </p> <p align="left">#1) Title <br /> <label> <input name="header" type="text" style="height:30px; font-size:28px; font:Helvetica,Verdana;" id="header" /> </label> </p> <p align="left">#2) Add Description </p> <p align="left"> <textarea name="body" cols="45" rows="15"></textarea> </p> <div id="Layer1"><img src="yellow_rock.gifs" width="346" height="262" /></div> <p align="left">#3) Click Button </p> <p align="left"> <input name="input" type="submit" value="Create PDF" /> </p> <p align="left"> </p> <p> </p> </form> </body> </html> ---create.php--- <?php $header =$_POST['header']; $body =$_POST['body']; include ('class.ezpdf.php'); $pdf =& new Cezpdf(); $pdf->addJpegFromFile('jawbone.jpg',199,$pdf->y-200,200,0); $pdf->selectFont('./fonts/Helvetica.afm'); $pdf->ezText($header . "\n\n",25,array('justification'=>'centre')); $pdf->ezText("\n\n\n\n\n\n\n" . $body,16,array('justification'=>'centre')); $pdf->output(); $pdf->ezStream(); ?> tanx..
×
×
  • 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.