0

I am not so good at Magento pdf, Any one who applied this please help me. In a Invoice PDF i need to draw table for the products list or item list,enter image description here

it would very great if any one helps me out with this.

2
  • have you tried something:??
    – Amit Bera
    Oct 6, 2015 at 5:49
  • no i have no idea of how to??
    – Karthick
    Oct 10, 2015 at 20:40

1 Answer 1

4

First of all overwrite invoice.php in local (which is in Mage_Sales_Model_Order_Pdf_Invoice)

Before call _drawItem define a variable for $startTable=$this->y;

After _drawItem function

$page = $this->_drawItem($item, $page, $order);
                $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
                $page->setLineWidth(0.5);
                $page->drawLine(25, $this->y + 12.5, 570, $this->y + 12.5);

$page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));

$page->setLineWidth(0.5);

$page->drawLine(25, $startTable,25,$this->y+12.5); 

$page->drawLine(185, $startTable,185, $this->y+12.5);

$page->drawLine(275, $startTable,275,$this->y+12.5);

$page->drawLine(345, $startTable,345,$this->y+12.5);

$page->drawLine(460, $startTable,460,$this->y+12.5);

$page->drawLine(570, $startTable,570, $this->y+12.5);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.