Magento – How to get pdf invoice programmatically

invoicepdfPHP

In Magento Backend, when looking at an invoice details, it is possible to get a pdf version in clicking the "print" button.

Is there a way to get this pdf invoice using a php script?

Best Answer

You can use:

$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));

where $invoice is the invoice object.

Related Topic