0

I am creating a module, that should send invoices and the order(confirmation) pdfs to some declared E-Mail addresses. I am able to do so for the invoices. But I dont know how to generate the order-confirmation pdf files.

For the invoice pdfs I am using:

Magento\Sales\Model\Order\Pdf\Invoice;

and I can call it in my class with $pdfContent = $this->pdfInvoiceModel->getPdf([$invoice])->render();

0

Turns out: there is no functionality in magento2 (vanilla) to generate an "Order PDF" - so, you could either generate an own pdf file with the ZEND Framework or use an extension to do so. I am using an extension by XTENTO now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.