How to customise the new Order Confirmation PDF

The order pdf is generated here: /app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Order.php. 

The pdf closely matches the default Magento invoice pdf. Feel free to adjust this code to your needs. 

For an easier option you might want to check out Fooman Pdf Customiser, which adds 65+ easy custom options via the Magento backend.

Example: Removing the tax column from the Order PDF

Copy app/code/core/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php 

to app/code/local/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php

and remove/comment out this code

	$lines[0][] = array( 'text' => $order->formatPriceTxt($item->getTaxAmount()), 'feed' => 495, 'font' => 'bold', 'align' => 'right' );

In addition, please edit the local copy of app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Order.php _printTableHead()

and comment out these lines:

	return parent::_drawHeader($page); $page->drawText(Mage::helper('sales')->__('Tax'), 480, $this->y, 'UTF-8')

Still need help? Contact Us Contact Us