Editing Magento’s Invoice & Despatch PDF Layouts

Magento Invoice and Shipping (Despatch) PDF files are delivered with a reasonable layout, already suited toA4 printing, but benefit from some layout improvements, increasing font sizes, and lightening the greyscale boxes in the interests of readability.
Take a copy of the relevant core files and place them in:

/app/code/local/Mage/Sales/Model/Order/Pdf

The relevant files are Invoice.php & Shipment.php, but Abstract.php contains functions common to both, and the subdirectory Items contains formatting for the line items of each document type.
The following snippet can be used to format database values as currency values:

$formattedPrice = Mage::helper('core')->currency($Price,true,false);

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *