Menu

writeHtml position

Help
og875
2012-07-05
2014-02-27
  • og875

    og875 - 2012-07-05

    Hello !

    I'm building a table with tcpdf dynamically from database values. I have to
    use the tcpdf cells and can not convert a html table to pdf because my table
    has nested row groupings. Building the table works fine. Only with the header
    of the table I have some trouble:

    In one header cell I would like to have a symbol instead of a text. So I put a
    svg image in this cell which works fine. Only the position of the cell with
    the image is wrong. It should be in the last cell of the table header near the
    right border of the pdf document but it is on the left border overlapping the
    first cell of the table header. What can I do to influence the position of the
    html-cell ?

    Here is the code I use to write the header cells:

            foreach ($cells as $cell) {
                if (!$this->hasHTML($cell['title'])) {
                    $this->Cell($cell['width'], $this->_cellheight, $cell['title'], 1, 0, $cell['align'], 0);
                } else {
                    $lastx = $this->getX();
                    $lasty = $this->getY();
                    $this->Rect($lastx, $lasty, $cell['width'], $this->_cellheight);
                    $this->writeHTML($cell['title'], $ln = false, $fill = false, $reseth = false, $cell = true, $align = $cell['align'] );
                }
            }
    

    Any ideas ?

    Thanks in advance

     
  • Fabiana Fernandes Santos

    I have the same problem! og875

    How do you solve it!

     

Log in to post a comment.

MongoDB Logo MongoDB