tes php

ob_start();
define(‘FPDF_FONTPATH’,’libs/fpdf/font/’);
require(‘libs/fpdf/fpdf.php’);
$pdf = new FPDF($posisi_halaman,$satuan,$jenis_kertas);
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont(‘Arial’,’B’,’14’);
$pdf->Image(‘images/koding1.jpeg’,17,1,3,3);
$pdf->Image(‘images/koding2.jpeg’,17,4,3,3);
$pdf->Image(‘images/koding3.jpeg’,17,7,3,3);
$pdf->Cell(9.5,2,’Percobaan pembuatan PDF’,1,0,’L’);
$pdf->Ln();
$pdf->Output();
ob_start();

define(‘FPDF_FONTPATH’,’libs/fpdf/font/’);

require(‘libs/fpdf/fpdf.php’);

$pdf=new FPDF(‘P’,’cm’,’Letter’);

$pdf->Open();

$pdf->AddPage();

$pdf->SetFont(‘Arial’,’B’,12);

$pdf->Image(‘images/koding1.jpeg’,17,1,3,3);
$pdf->Image(‘images/koding2.jpeg’,17,4,3,3);
$pdf->Image(‘images/koding3.jpeg’,17,7,3,3);

$pdf->SetFont(‘Arial’,’B’,20);
$pdf->Cell(9.5,2,’Latihan membuat PDF’,1,0,’L’);
$pdf->Ln();
$pdf->SetFont(‘Arial’,’B’,14);
$pdf->Cell(9.5,2,’Oleh bimosaurus.com’,0,0,’L’);
$pdf->Ln();

$pdf->Output();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s