Jump to content

Help with wordwrap please


aeroswat

Recommended Posts

Here is the for loop where i'm having a problem. The specific spots have arrows at the beginning of the line

 

for($i=1;$i<4;$i++){
			$pdf->SetFont('Times','B',14);
			$pdf->Cell(120,5,'Alabama Instructional Resource Center for the Blind');
			$pdf->Cell(80,5,'ORDER ACKNOWLEDGEMENT');
			$pdf->Cell(3,5,$i);
			$pdf->Ln(7);
			$pdf->SetFont('Times','B',12);
			$pdf->Cell(100,0,'Alabama Institute for the Deaf and Blind');
			$pdf->SetFont('Times','',12);
			$pdf->Cell(65,0,"Process Date: " . $res['FDateOrdered']);
			$pdf->Cell(50,0,"Ship Date: " . $res['FShipDate']);
			$pdf->Ln(5);
			$pdf->SetFont('Times','B',12);
			$pdf->Cell(100,0,"P.O. Box 698, Talladega, AL 35161");
			$pdf->SetFont('Times','',12);
			$pdf->Cell(65,0,"Order Number: " . $res['OrderNumber']);
			$pdf->Cell(25,0,"Line Number: " . $res['Line']);
			$pdf->Ln(5);
			$pdf->SetFont('Times','B',12);
			$pdf->Cell(100,0,"1-256-761-3262 or 1-256-761-3337");
			$pdf->SetX(100);
			$pdf->SetFont('Times','',12);
---->				$pdf->MultiCell(60,5,"Title: " . wordwrap($res['BookTitle'],60,'\n'));
			$pdf->Ln(5);
			$pdf->SetY(25+(94*($i-1)));
---->				$pdf->MultiCell(100,0,wordwrap($resCode['Definition'],90,'\n'));
			$pdf->Ln(10);
			$pdf->SetX(100);
			$pdf->Cell(100,0,"ISBN#: " . $res['ISBNten']);
			$pdf->Ln(5);
			$pdf->Cell(70,0,$res['SchoolSystem']);
			$pdf->Cell(30,0,"Code: " . $res['Code']);
			$pdf->Cell(75,0,"Publisher: " . $res['Publisher']);
			$pdf->Cell(50,0,"Copyright: " . $res['Copyright']);
			$pdf->Ln(10);
			$pdf->SetX(5);
			$pdf->Cell(95,0,"Student: " . $res2['StudentName']);
			$pdf->Cell(70,0,"AIRCB#: " . $res['AIRCBNum']);
			$pdf->Ln(5);
			$pdf->SetX(10);
			$pdf->Cell(90,0,$res['ShipAttention']);
			$pdf->Cell(75,0,"Item#: " . $res['ItemNum']);
			$pdf->Cell(50,0,"Value: \$" . number_format($res['Cost'],2));
			$pdf->Ln(5);
			$pdf->SetX(10);
			$pdf->Cell(90,0,$res['ShipName']);
			$pdf->Cell(40,0,"Format: " . $res['FormatNeeded']);
			$pdf->Cell(35,0,"Grade: " . $res['StudentGrade']);
			$pdf->Cell(40,0,"Record #: " . $res['OrderYearNum']);
			$pdf->Ln(5);
			$pdf->SetX(10);
			$pdf->Cell(90,0,$res['ShipAddress']);
			$pdf->SetFont('Times','I',12);
			$pdf->Cell(100,0,"Upon receipt of item, please sign and return.");
			$pdf->Ln(5);
			$pdf->SetX(10);
			$pdf->SetFont('Times','',12);
			$pdf->Cell(105,0,$res['ShipCity'] . ", " . $res['ShipState'] . " " . $res['ShipZip']);
			$pdf->Ln(5);
			$pdf->SetX(100);
			$pdf->SetFont('Times','I',12);
			$pdf->Cell(70,0,"Signature_________________________");
			$pdf->Cell(40,0,"Date_________________");
			$pdf->Ln(10);
			$pdf->SetFont('Times','BI',12);
			$pdf->Cell(220,0,"All items MUST be returned to AIRCB ASAP at the completion of each course.",0,0,'C');
			$pdf->Ln(10);
		}

My issue is that no matter what # of lines I put in the wordwrap function it still breaks at the same spot. I have tried values between 40 and 90

Link to comment
https://forums.phpfreaks.com/topic/187172-help-with-wordwrap-please/
Share on other sites

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.