 |
|
ผม Query ข้อมูลจาก ฐานข้อมูล MySQL มาสร้างเป็นตาราง
และข้อความที่ออกมามันมีความยาวมากครับ มันก็เลยเกินหน้า เกินตารางไม่ยอมขึ้นบรรทัดใหม่ไห้
จะแก้ไขยังไงครับ ปวดหัวแล้วววว...
Code (PHP)
<?
require_once('dbconn.php');
$query = "select * from project";
$query = $query." where project_id = '255204027' ";
$rsmem=mysql_db_query($db,$query);
$num=mysql_num_rows($rsmem);
$row = mysql_fetch_assoc($rsmem);
?>
<?
require('thaipdfclass.php');
$pdf=new ThaiPDF();
$pdf->SetThaiFont();
$pdf->AddPage();
$pdf->Image('logo_regis.jpg',90,10);
$pdf->SetFont('CordiaNew','B',20);
$pdf->SetTextColor(0,0,0);
$pdf->Ln(40);
$pdf->Cell(0,7,'ใบสมัครขอรับทุนเพื่อการศึกษาค้นคว้าด้วยตนเองสำหรับนิสิตคณะวิทยาศาสตร์',0,1,'C');
$pdf->Ln(10);
$pdf->SetFont('CordiaNew','B',16);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(0,7,'ข้อมูลโครงการ',1,0,'L');
$pdf->Ln(7);
$pdf->SetFont('CordiaNew','',15);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(50,7,'รหัสโครงการ : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[project_id],1,1,'L');
$pdf->Cell(50,7,'ชื่อโครงงานภาษาไทย : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[project_name_th],1,1,'L');
$pdf->Cell(50,7,'ชื่อโครงงานภาษาอังกฤษ : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[project_name_en],1,1,'L');
$pdf->Cell(50,7,'ชื่อโครงงานภาษาอังกฤษ : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[project_name_en],1,1,'L');
$pdf->Cell(50,7,'อาจารย์ที่ปรึกษาโครงงาน : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[teacher_id],1,1,'L');
$pdf->Cell(50,7,'สถานที่ติดต่อได้สะดวก : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[address],1,1,'L');
$pdf->Cell(50,7,'โทรศัพท์ติดต่อ : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[telephone],1,1,'L');
$pdf->Cell(50,7,'Email : ',1,0,'R');
$pdf->Cell(140,7,' '.$row[contact_email],1,1,'L');
$pdf->Ln(10);
$pdf->SetFont('CordiaNew','B',16);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(0,7,'ข้อมูลผู้จัดทำ',1,0,'L');
$pdf->Ln(8);
$pdf->SetFont('CordiaNew','',15);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(20,7,'1.',1,0,'R');
$pdf->Cell(150,7,' '.$row[project_name_th],1,1,'L');
$pdf->Cell(20,7,'2.',1,0,'R');
$pdf->Cell(150,7,' '.$row[project_name_th],1,1,'L');
$pdf->Cell(20,7,'3.',1,0,'R');
$pdf->Cell(150,7,' '.$row[project_name_th],1,1,'L');
$pdf->Ln(30);
$pdf->Cell(0,7,' ลงชื่อ.............................................................หัวหน้าโครงการ',0,1);
$pdf->Cell(0,7,' (.............................................................)',0,1);
$pdf->Cell(0,7,' ลงชื่อ.............................................................ที่ปรึกษาโครงการ',0,1);
$pdf->Cell(0,7,' (.............................................................)',0,1);
$pdf->Cell(0,7,' วันที่........... เดือน.....................................ปี..............',0,1);
$pdf->Output();
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-04-01 17:27:13 |
By :
maccit |
View :
2070 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |