Magento 1.9 – How to Change Title of Invoice PDF

invoicemagento-1.9pdf

Can anybody tell me where I can change the title of the invoice pdf.
At the moment it states invoice(date and time). I want to change it to Invoice(invoicenumber)I work with magento 1.9.1.

Best Answer

Vinothavn, thnx for your answer. I looked into the coding and tried it, but unfortulnately it didnt work. But I altered some other code in the same file and that did work. I changed this:

$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
                '.pdf', $pdf->render(), 'application/pdf');

Into this:

$this->_prepareDownloadResponse('Factuur_'. $invoice->getIncrementId().
                '.pdf', $pdf->render(), 'application/pdf')

And now the pdf exports with the invoicenumber.

Related Topic