I am having custom attribute called FREE OFFER. now i need to display the values of attribute FREE OFFER in invoice PDF.
I displayed the attribute in invoice. but when i click print the output PDF is not displaying the attribute.
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 documentMage_Sales_Model_Order_Pdf_Abstract
- parent class of the pdf_invoice class where the functions for rendering and inserting details are definedTo add your attribute to the pdf invoice, you need to rewrite this/these classes:
Mage_Sales_Model_Order_Pdf_Items_Invoice_Default
and/orMage_Sales_Model_Order_Pdf_Items_Invoice_Grouped
where product name, sku, qty, etc. are drawed on the pdf