SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow How to separate writeHTMLCell content in TCPDF

    Hi friends,
    I have a problem Regarding TCPDF . I need 2 different table colums
    using tcpdf method "writeHTMLCell" . but I cannot break that as 2, it show as one table .
    please look the images to understand that there is a "model" and "not model" images , compare same and help me
    to give a gap among them .

    model
    ========
    model.jpg


    not model
    =========

    not model.png

    Thankfully,
    Anes

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,233
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what code you are using exactly, but check out example 48, it seems to do what you want.
    http://www.tcpdf.org/examples.php

  3. #3
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Hi cpradio,
    I am not plan to use HTML table as you shown in 48 example ....

    My current code for 2 parts is now :

    Code:
    $declaration = "<br />We declare that this invoice shows the actual price of the goods described and that all particulars are true and correct.";
    						$signature  = "For Maxworth International Pty Ltd <br /><br /><br /><br /> Authorised Signatory";	
    						$y = $this->getY();
    						$x = $this->getX();
    						$this->writeHTMLCell(136,22,'',$y,$declaration,1,1,1, true, 'J',false);	
    						$this->writeHTMLCell(50,22,$x+136,$y,$signature,1,1,1, true, 'J',true);	
                            /* Bank details */
    						$accountname = "Account Name: <br /><b>".$this->bean->accountname_c;
    						$swiftcode  = "SWIFTCODE: <br /><b> ".$this->bean->swiftcode_c."</b>";
    						$accountno  = "ACCOUNT NO: <br /><b>".$this->bean->accountno_c."</b>";
    						$bankname  = "Bank Name: <br /><b>".$this->bean->bankname_c."</b>";
    						$branchname  = "Branch Name: <br /><b>".$this->bean->branchname_c."</b>";
    						$text = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>PN : Use your Invoice Number as reference</b>";
    						
    						$y = $this->getY();
    						$x = $this->getX()+10;
    						$this->writeHTMLCell(55,12,$x,$y,$accountname,1,1,1, true, 'J',false);	
    						$this->writeHTMLCell(55,12,$x+55,$y,$swiftcode,1,1,1, true, 'J',true);	
    						$this->writeHTMLCell(55,12,$x+110,$y,$accountno,1,1,1, true, 'J',true);	
    						$this->writeHTMLCell(55,12,$x,$y+12,$bankname,1,1,1, true, 'J',true);	
    						$this->writeHTMLCell(110,12,$x+55,$y+12,$branchname,1,1,1, true, 'J',true);	
    						
    						$this->writeHTMLCell(165,12,$x,$y+24,$text,1,1,1, true, 'J',true);
    						$this->writeHTMLCell(165,12,$x,$y+36,'',1,1,1, true, 'J',true);
    Please advise in this scenario.

    Thankfully,
    Anes

  4. #4
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,233
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Wouldn't you then just increase your y coordinate (the second instance of the below)?
    PHP Code:
    $y $this->getY() + 10

  5. #5
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool [solved]

    Thans Cpradio , your solution rocks

    thankfully,
    Anes


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •