Jump to content

printing a bar code in fpdf


sspence65

Recommended Posts

This is my label so far, without any bar code script.

 

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

$monthCode = array("02", "03", "04", "06", "09", "10", "10", "11", "11", "12", "12", "01");
$monthLetterCode = array("A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M");

$realMonthCode = date("n"); 
$labelYearCode = date("y");
$arrayMonthCode = $realMonthCode - 1;
$labelMonthCode = $monthCode[$arrayMonthCode];
$labelLetterCode = $monthLetterCode[$arrayMonthCode];
$myString = "Sh" . $labelMonthCode . $labelYearCode . $labelLetterCode;


$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,12,'P4-830R',0,1);
$pdf->SetFont('Arial','B',;
$pdf->Cell(40,5,'Suntec "A" Series Fuel Unit',0,1);
$pdf->Cell(40,5,'Kerosene Only',0,1);

$pdf->Cell(81);
$pdf->SetFont('Arial','B',;
$pdf->Cell(14,5,$myString,1,1);

$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'OEM');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'#A1VA-7112');
$pdf->Cell(10);
$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'STG');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'Single');
$pdf->Cell(10);
$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'ROT');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'CW-R',0,1);




$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'MNT');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'Flange');
$pdf->Cell(10);
$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'STG');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'Single');
$pdf->Cell(10);
$pdf->SetFont('Arial','B',6);
$pdf->Cell(3,5,'ROT');
$pdf->SetFont('Arial','',6);
$pdf->Cell(3);
$pdf->Cell(3,5,'CW-R',0,1);

$pdf->SetFont('Arial','',4);
$pdf->Cell(80,5,'Sid Harvey Industries, Inc.   605 Locust St.,     Garden City, NY 11530',0,0,'C');

$pdf->Image('Sid.JPG',90,10,15,15);


$pdf->Output();
?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.