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.

1
  • 1
    Changing the inoice layout in magento is always a tough task and you should plan a LOT OF TIME for it. Maybe have a look on Firegento_Pdf, we think it is easier to customize: github.com/firegento/firegento-pdf Commented Apr 8, 2014 at 7:06

1 Answer 1

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
7
  • 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. Commented Mar 8, 2014 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) Commented Mar 8, 2014 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? Commented Mar 8, 2014 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. Commented Mar 8, 2014 at 11:57
  • can you tell me if i want to draw table ? how to draw table or border ? Commented Mar 8, 2014 at 11:59

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