Advanced Usage

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.

Print Tasks
Caught a mistake? Suggest an edit on GitHub