Receipt Printing

If you have a receipt printer, you can easily print receipts to it via the Rawilk\Printing\Receipts\ReceiptPrinter. This will generate a string that you can then send to your receipt printer.

// First generate the receipt
$receipt = (string) (new ReceiptPrinter)
    ->text('My heading')
    ->twoColumnText('Item 1', '2.00')
    ->twoColumnText('Item 2', '4.00')

// Now send the string to your receipt printer

If you are using the PrintNode driver, the content will be base64_encoded automatically for you.

More info on the receipt printer can be found in the api reference.

← Previous Topic

Print Tasks

Next Topic →

Raw Content Printing

Caught a mistake? Suggest an edit on Github