Hi all,
I have managed to find some information regarding PHP and label printing, I am using FPDF. I have design all the images for my labels and sripted the code to place them in the correct place. I am however stuck with one big promlem, I can't get the data to appear in the PDF.
I am trying to output one SESSION var; this is my code:
<?php
session_start();
define('FPDF_FONTPATH','/var/www/vhosts/httpdocs/fonts/');
require('fpdf.php');
class PDF extends FPDF
{
//Load data
function LoadData($data)
{
//Read file lines
$data= $_SESSION['_amember_user']['member_id'];
}
//Page header
function Header()
{
//Label 1 -1
$this->Image('bagtag_top_v1.jpg',0,14.5);
$this->Image('bagtag_left_v1.jpg',0,28.5);
$this->Image('bagtag_right_v1.jpg',84.35,28.5);
$this->Image('bagtag_bottom_v1.jpg',0,39.5);
//Label 1 -2
$this->Image('bagtag_top_v1.jpg',107,14.5);
$this->Image('bagtag_left_v1.jpg',107,28.5);
$this->Image('bagtag_right_v1.jpg',191.35,28.5);
$this->Image('bagtag_bottom_v1.jpg',107,39.5);
//Label 2 -1
$this->Image('bagtag_top_v1.jpg',0,54.5);
$this->Image('bagtag_left_v1.jpg',0,68.5);
$this->Image('bagtag_right_v1.jpg',84.35,68.5);
$this->Image('bagtag_bottom_v1.jpg',0,79.5);
;
}
//Page footer
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial','I',8);
}
}
//Instanciation of inherited class
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);
$vals = $_SESSION['_amember_user']['member_id'];
$data=$pdf->LoadData($vals);
$pdf->Output();
?>
Can some one point me in the right direction please.