Network_ninja Posted September 29, 2011 Share Posted September 29, 2011 I would like to create a page in pdf format and I found it possible by using fpdf, but how would I create a page that looks something like this: 1 Flathead nails 3/4" 1,170.00KG @ 60.00 70,200.00 2 Drip edge using plain G.I sheet 3,304.00PCS @ 80.00 264,320.00 4" x 8" x Ga. #24 including cutting and bending (as per drawing). requirements : 472 sheets 1 sheet = 7 pieces 3 Wall flashing using plain G.I sheet 712.00PCS @ 70.00 49,840.00 4" x 8" x Ga. #24 including cutting and bending (as per drawing) requirements : 89 sheets 1 sheet = 8 pieces ********************* NOTHING FOLLOWS ********************* I really need something like this that shows no border because borders are already pre printed. Before posting here I googled it first And found a code that would possibly create my concern but I found some problem of the code and I need some help to make this working. Existing code: <?php require('fpdf/fpdf.php'); $pdf = new FPDF(); $pdf->AddFont('Bookman','','Bookos.php'); $pdf->AddPage(); $pdf->SetFont('Bookman','',14); $x=16; $y=26; $width=30; $height=35; $leftmargin=16; $content = "content"; //$content = "This is a very long content, this must goes to the next line. "; for ($r=0;$r<5;$r++){ for ($c=0;$c<6;$c++){ $pdf->SetY($y); //set pointer back to previous values $pdf->SetX($x); $x=$pdf->GetX()+$width; $y=$pdf->GetY(); $pdf->MultiCell($width,$height,$content,1,'L'); } $y+=$height; $x=$leftmargin; $pdf->SetY($y); } $pdf->Output(); ?> There are two problems with this code: 1.) Only the first page is working well. 2.) It will not create a newline in each cell if the content is long.... Tnx in advance to everyone..... pls..... Quote Link to comment https://forums.phpfreaks.com/topic/248077-fpdf-help/ Share on other sites More sharing options...
MadTechie Posted September 29, 2011 Share Posted September 29, 2011 This is just a quick reply as its 5am here and i am about to get some sleep.. however I can't remember exactly but when reading this I remembered an extended class called multi cell details here, that may help.. Quote Link to comment https://forums.phpfreaks.com/topic/248077-fpdf-help/#findComment-1273818 Share on other sites More sharing options...
Network_ninja Posted September 29, 2011 Author Share Posted September 29, 2011 Tnx for the quick reply. but I am already using MultiCell in my code... Quote Link to comment https://forums.phpfreaks.com/topic/248077-fpdf-help/#findComment-1273827 Share on other sites More sharing options...
MadTechie Posted October 8, 2011 Share Posted October 8, 2011 Maybe try increasing the height Quote Link to comment https://forums.phpfreaks.com/topic/248077-fpdf-help/#findComment-1277187 Share on other sites More sharing options...
Network_ninja Posted October 9, 2011 Author Share Posted October 9, 2011 tnx to everyone, i already found and answer at www.fdpf.org. A script submitted by a helpful developers. tnx Quote Link to comment https://forums.phpfreaks.com/topic/248077-fpdf-help/#findComment-1277351 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.