25

I want to customized the Invoice PDF layout.

when there is big product name the the table data are not looking proper alignedenter image description here.

How Can i easily manage the design of the PDF INVOICE.

I tried to make changes in app/code/core/mage/sales/model/order/pdf/abstract.php but didn't get the solution. need help to Fix the pdf layout design.

11

You can customize the invoice layout by modifying this file : Mage_Sales_Model_Order_Pdf_Invoice(app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php). Of course you need to rewrite the file properly.

Also take a look at these articles for additional info and examples:

  1. http://www.atwix.com/magento/customize-magento-pdf-invoice-and-packingslip/
  2. http://www.satollo.net/magento-how-to-sligtly-modify-the-invoice-pdf
  3. http://www.magentocommerce.com/knowledge-base/entry/custom-pdf-templates/
  4. http://www.magentocommerce.com/wiki/5_-_modules_and_development/orders/editing_an_invoice_pdf
  • hi, thanks for reply. i did check both source. invoice.php and abstract.php arestill open and still making changes to it but didn't find how to fix it. – Jack Torris Mar 8 '14 at 11:37
  • Well, Magento uses Zend_Pdf classes to create pdf files. So you can take a look here on how to add things like margins, padding and so on(framework.zend.com/manual/1.12/en/zend.pdf.pages.html) – Evgeni Ivanov Mar 8 '14 at 11:40
  • to check the changes i am making i need to make changes to the file and then recreate the invoice through PDF. can i check the output easily ? i mean without creating invoice everytime? – Jack Torris Mar 8 '14 at 11:51
  • First make sure that the cache is disabled. Than when you make a change just print an already existing invoice(Sales->Invoices). Repeat the process whenever you make some change to the layout. – Evgeni Ivanov Mar 8 '14 at 11:57
  • can you tell me if i want to draw table ? how to draw table or border ? – Jack Torris Mar 8 '14 at 11:59

protected by Community Jun 30 '17 at 17:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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