rawilk / laravel-printing

Direct printing for Laravel apps.
https://randallwilk.dev/docs/laravel-printing
MIT License
447 stars 71 forks source link

Unable to print ZPL code #63

Closed danielbehrendt closed 1 year ago

danielbehrendt commented 1 year ago

Laravel Printing Version

v3.0.3

Laravel Version

v10.13.5

Print Driver

PrintNode

Bug description

When trying to print ZPL code via PrintNode with the following code:


$zplCode = <<<EOT
^XA
^CFA,30
^FO50,300^FDJohn Doe^FS
^FO50,340^FD100 Main Street^FS
^FO50,380^FDSpringfield TN 39021^FS
^FO50,420^FDUnited States (USA)^FS
^XZ
EOT;

$printJob = Printing::newPrintTask()
    ->printer($printerId)
    ->content($zplCode)
    ->send();

I always get the code printed on the label but its not converted.

When debugging the returned $printJob I do see that its contentType is raw_uri and not raw_base64.

How can I set the contentType with the above code to ensure it's correctly printed?

Steps to reproduce

No response

Relevant log output

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.