Jump to content

Invoice as image


Recommended Posts

I'm currently trying to create a module for automatic accounting in my accounting software.

 

For this I need a way to export the invoice of an given order to an image (ie. a JPEG).

 

I have the following code, which doesn't seem to work right (the generated PDF isn't readable by Adobe Reader), which should generate a PDF file, but how to go from this to an image?

$order_invoice_list = $order->getInvoicesCollection();
Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list));
$pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, Context::getContext()->smarty);
$pdfInvoice = $pdf->render(true);
Edited by BlackChart (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...