Note that there are some explanatory texts on larger screens.

plurals
  1. POGenerate PDF with PHP
    primarykey
    data
    text
    <p>how generate PDF document with MYSQL query more than 15 fields with wrap text? I have generated PDF with fpdf option. but I have created only 8 fields with nowrap text. so any one please solve the solutions. thanks.</p> <p>For example. I have created with nowrap text.</p> <pre><code>$pdf=new PDF(); $pdf-&gt;AddPage(); $pdf-&gt;SetFont('Arial','B',12); $pdf-&gt;SetTextColor(4,126,167); $pdf-&gt;Cell(10,10,'Worksheet Report'); $pdf-&gt;Ln(); //Column titles $header=array('Client','Team In Charge','Staff In Charge','Priority','Master Activity','Sub Activity','Last Reports Sent','Job in Hand','Team Incharge Notes','External Due Date','Befree Due Date','Status'); $pdf-&gt;SetFont('Arial','B',6); $pdf-&gt;FancyTable($header); $pdf-&gt;SetFont('Arial','',5); $pdf-&gt;SetFillColor(255,255,255); $pdf-&gt;SetTextColor(0); $pdf-&gt;SetLineWidth(.2); $sql=$_SESSION['query']; $result = mysql_query($sql); while($row = @mysql_fetch_array($result)){ $pdf-&gt;Cell(15,10,htmlspecialchars($row["lp_wrk_CompanyName"]),1,0,'T',true); $pdf-&gt;Cell(17,10,$commonUses-&gt;getFirstLastName($row["wrk_TeamInCharge"]),1,0,'T',true); $pdf-&gt;Cell(17,10,$commonUses-&gt;getFirstLastName($row["wrk_StaffInCharge"]),1,0,'T',true); $pdf-&gt;Cell(12,10,htmlspecialchars($row["lp_wrk_priority"]),1,0,'T',true); $pdf-&gt;Cell(17,10,htmlspecialchars($row["lp_wrk_MasCode"]).($row["lp_wrk_MasCode"]!=""? "-":"").htmlspecialchars($row["lp_wrk_MasterActivity"]),1,0,'T',true); $pdf-&gt;Cell(15,10,htmlspecialchars($row["lp_wrk_SubCode"]).($row["lp_wrk_SubCode"]!=""? "-":"").htmlspecialchars($row["lp_wrk_SubActivity"]),1,0,'T',true); $pdf-&gt;Cell(19,10,htmlspecialchars($row["wrk_Details"]),1,0,'T',true); $pdf-&gt;Cell(18,10,htmlspecialchars($row["wrk_Notes"]),1,0,'T',true); $pdf-&gt;Cell(19,10,htmlspecialchars($row["wrk_TeamInChargeNotes"]),1,0,'T',true); $pdf-&gt;Cell(18,10,$commonUses-&gt;showGridDateFormat($row["wrk_DueDate"]),1,0,'T',true); $pdf-&gt;Cell(18,10,$commonUses-&gt;showGridDateFormat($row["wrk_InternalDueDate"]),1,0,'T',true); $pdf-&gt;Cell(15,10,htmlspecialchars($row["lp_wrk_Status"]),1,0,'T',true); $pdf-&gt;Ln(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload