sspence65 Posted March 13, 2013 Share Posted March 13, 2013 I'm using fpdf, and need to place a 128 bar code on a label. I'll be pulling a 12 digit code from mysql. Not even sure where to begin. I have my label "built" using fpdf. Link to comment https://forums.phpfreaks.com/topic/275623-printing-a-bar-code-in-fpdf/ Share on other sites More sharing options...
sspence65 Posted March 13, 2013 Author Share Posted March 13, 2013 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(); ?> Link to comment https://forums.phpfreaks.com/topic/275623-printing-a-bar-code-in-fpdf/#findComment-1418467 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.