Print Sales Invoice to printer from code

You can print an existing Sales invoice to a printer through the following code, no matter how the Print Management setup of Sales Invoice might look like:

Print Sales Invoice to PDF file from code

You can print an existing Sales invoice to a PDF file named as SalesInvoice_<InvoiceId>.pdf through the following code, regardless of how the Print Management setup of Sales Invoice might look like: