Advanced Usage

Raw Content Printing

{note} You're browsing the documentation for an old version of laravel-printing. Consider upgrading your project to v3. Check your version with the following command:

composer show rawilk/laravel-printing

Depending on your print driver and printer, you can send raw text or content from a url to be printed instead of using a pdf file.

Send a string of text to be printed using the content() method on PrintTask. This is the method you should be using if you are printing a receipt.

Printing::newPrintTask()
    ->printer($printerId)
    ->content('hello world')
    ->send();

You can also print the contents of a URL using the url() method on PrintTask.

Printing::newPrintTask()
    ->printer($printerId)
    ->url('https://google.com')
    ->send();
Previous
Receipt Printing
Caught a mistake? Suggest an edit on GitHub