Jump to content

sspence65

Members
  • Posts

    4
  • Joined

  • Last visited

sspence65's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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(); ?>
  2. 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.
  3. That did the trick. Not including the $ was stupid mistake, but the [ was a revelation, thanks.
  4. I'm clearly doing something wrong. I ported this piece of code from one I wrote in VBScript (where it works great), but I'm not as familiar with php syntax. Hopefully you can see where I'm going with this. I want to end up with a variable that contains the string of Sh0413C $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;
×
×
  • 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.