Minggu, 03 Juni 2018

PHP Code Generate PDF SIMPLE



<?php
require('fpdf/fpdf.php');

class PDF extends FPDF{

function PDF($orientation='P', $unit='mm', $size='A4'){
    $this->FPDF($orientation,$unit,$size);
}

function Header(){
    $this->SetFont('Times','B',14);
    $this->Cell(80);
    $this->Cell(30,10,'PROSES BELAJAR DI LP2M ARAY',0,0,'C');
    $this->Ln(20);
}

function Footer(){
    $this->SetY(-15);
    $this->SetFont('Times','',8);
    $this->Cell(0,10,$this->PageNo(),0,0,'R');
}

}



$pdf = new PDF();
$pdf->AddPage();
$pdf->SetFont('Times','B',14);
$pdf->Cell(40,10,'Nilai Alternatif Kriteria',0,0,'L');
$pdf->ln();
$pdf->SetFont('Times','B',12);
$pdf->Cell(40,7,'Kriteria/Alternatif',1,0,'L');

for($i=1;$i<=5;$i++){
$pdf->Cell(30,7,"Header".$i,1,0,'L');
}

$pdf->ln();
$pdf->SetFont('Times','',12);


for($i=1;$i<=5;$i++){
$pdf->Cell(40,7,"Baris".$i,1,0,'L');
for($ii=1;$ii<=5;$ii++){
$pdf->Cell(30,7,"Kolom".$i."-".$ii,1,0,'L');
}
$pdf->ln();
}

$pdf->SetFont('Times','B',14);
$pdf->Cell(40,10,'Normalisasi R',0,0,'L');
$pdf->ln();

$pdf->SetFont('Times','B',12);
$pdf->Cell(40,7,'Kriteria/Alternatif',1,0,'L');
for($i=1;$i<=5;$i++){
$pdf->Cell(30,7,"Kolom".$i,1,0,'L');
}

$pdf->ln();
$pdf->SetFont('Times','',12);


$pdf->Output();
?>

Atau SIlakan Download dimari

Tidak ada komentar:

Posting Komentar

global_priv WARNING Selalu

 Jika muncul pesan kesalahan: Warning in .\libraries\classes\Dbal\DbiMysqli.php#209  mysqli::query(): (HY000/1034): Index for table 'glo...