Magento – Display custom attribute in invoice pdf magento

attributesinvoicemagento-1.7pdf

I am having custom attribute called FREE OFFER. now i need to display the values of attribute FREE OFFER in invoice PDF.

enter image description here

I displayed the attribute in invoice. but when i click print the output PDF is not displaying the attribute.

enter image description here

   this is the output of the pdf its not showing the FREE OFFER attribute

anyone can help me thanks in advance.

Best Answer

To find out how pdf generation works, have a look at these classes:

Mage_Sales_Model_Order_Pdf_Invoice - pdf header & return document Mage_Sales_Model_Order_Pdf_Abstract - parent class of the pdf_invoice class where the functions for rendering and inserting details are defined

To add your attribute to the pdf invoice, you need to rewrite this/these classes:

Mage_Sales_Model_Order_Pdf_Items_Invoice_Default and/or Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped where product name, sku, qty, etc. are drawed on the pdf

Related Topic