Rectangle 27 0

mysql A borderless table using fpdf in PHP?


<?php

include_once 'scripts/init.php'; //Connect to the database
require 'fpdf/fpdf.php';
require 'fpdf/rotation.php';   //import fpdf and the watermark class

$aptid = $_SESSION['apt'];  //The applicant ID

//Class to create the water mark
class PDF extends PDF_Rotate
{
function Header()
{
    //Put the watermark
    $this->SetFont('Arial','B',50);
    $this->SetTextColor(255,192,203);
    $this->RotatedText(35,190,'FOR VERIFICATION ONLY',45);
}

function RotatedText($x, $y, $txt, $angle)
{
    //Text rotated around its origin
    $this->Rotate($angle,$x,$y);
    $this->Text($x,$y,$txt);
    $this->Rotate(0);
}
}

$pdf=new PDF(); //create an instance of the fpdf class
$pdf->AddPage(); //create the pdf page

//Retrieve the qualification holder details from the database
$query = "SELECT a.QhFullName, a.QhDOB, a.Qualification, a.IssuingBody, a.CompletionDate, a.EntryRequirements, a.CountryEligibility, a.ProgrammeRequirements, a.MinStudyDuration, a.CountryLevel, a.OrgField, a.SubFramework, a.NQFLevel, a.Credits, a.ClosestQualification
                    FROM Evaluation a
                    INNER JOIN Apn b ON a.ApnID = b.AptID
                    WHERE b.AptID LIKE $aptid";


    $stmt = sqlsrv_query( $conn, $query);

    $record = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC);
    $text = 'Born: ';
    $text0 = '                                                                       ';
    $text1 = '                                     ';

    //heading
    $pdf->SetFont("Arial","B",10);
    $pdf->Cell(0,10,$record['QhFullName'].$text0.$text.$record['QhDOB'],1,1,"L");
    //body of the pdf
    $pdf->ln();



//Display the qualification holders details on a pdf table using Cells
$pdf->SetFont("Arial","",06);
$pdf->Cell(80,5,'Qualification(1):',0,0,'L',0);
$pdf->Cell(80,5,$record['Qualification'],0,1,'L',0);
$pdf->Cell(80,5,'Awarding body/Institution:',0,0,'L',0);
$pdf->Cell(80,5,$record['IssuingBody'],0,1,'L',0);
$pdf->Cell(80,5,'Date of completion / award:',0,0,'L',0);
$pdf->Cell(80,5,$record['CompletionDate'],0,1,'L',0);
$pdf->Cell(80,5,'Purpose of the qualification:',0,0,'L',0);
$pdf->Cell(80,5,$record['CountryEligibility'],0,1,'L',0);
$pdf->Cell(80,5,'Minimum entry requirement:',0,0,'L',0);
$pdf->MultiCell( 80, 5,$record['EntryRequirements'], 0);
$pdf->Cell(80,5,'Minimum duration of study:',0,0,'L',0);
$pdf->Cell(80,5,$record['MinStudyDuration'],0,1,'L',0);
$pdf->Cell(80,5,'Requirements for the award:',0,0,'L',0);
$pdf->Cell(80,5,$record['ProgrammeRequirements'],0,1,'L',0);
$pdf->Cell(80,5,'Requirements for the award:',0,0,'L',0);
$pdf->Cell(80,5,$record['CountryLevel'],0,1,'L',0);

$pdf->SetFont("Arial","B",08);
$pdf->Cell(80,9,'RECOGNITION DECISION',0,1,'L',0);

$pdf->Cell(80,5,'Qualification(s) describe above:',0,0,'L',0);
$pdf->Cell(80,5,'Closest comparable South African qualification / qualification type',0,1,'L',0);

$pdf->Cell(80,5,'(1):',0,0,'C',0);
$pdf->Cell(80,5,$record['ClosestQualification'],0,1,'L',0);
$pdf->SetFont("Arial","",08);
$pdf->Cell(80,5,'Organising Field:',0,0,'L',0);
$pdf->SetFont("Arial","B",08);
$pdf->Cell(80,5,$record['OrgField'],0,1,'L',0);
$pdf->SetFont("Arial","",08);
$pdf->Cell(80,5,'Sub-framework location:',0,0,'L',0);
$pdf->SetFont("Arial","B",08);
$pdf->Cell(80,5,$record['SubFramework'],0,1,'L',0);

$pdf->SetFont("Arial","",08);
$pdf->Cell(80,5,'NQF Level(see overleaf):',0,0,'L',0);
$pdf->SetFont("Arial","B",08);
$pdf->Cell(80,5,substr($record['NQFLevel'], -1),0,1,'L',0);

$pdf->SetFont("Arial","",08);
$pdf->Cell(80,5,'Credits:',0,0,'L',0);
$pdf->SetFont("Arial","B",08);
$pdf->Cell(80,5,$record['Credits'],0,1,'L',0);


$pdf->Output();  //Output data to the PDF
?>

A zero in the cell syntax represents no boarder. it works the same for a multicell.

Note