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();