Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission denied #1319

Open
awyaawya opened this issue Apr 3, 2024 · 0 comments
Open

permission denied #1319

awyaawya opened this issue Apr 3, 2024 · 0 comments

Comments

@awyaawya
Copy link

awyaawya commented Apr 3, 2024

==============================================================
// error message

#message: "copy(\KENDEE\Canon G4010 series): Failed to open stream: Permission denied"
#code: 0
#file: "C:\Users\JohnDoe\htdocs\pos\vendor\mike42\escpos-php\src\Mike42\Escpos\PrintConnectors\WindowsPrintConnector.php"
#line: 375
#severity: E_WARNING

=============================================================
// code

public function printReceipt(Request $request){
try {
$connector = new WindowsPrintConnector("smb://KENDEE/Canon G4010 series");
$printer = new Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();

        /* Close printer */
        $printer -> close();
    } catch (Exception $e) {
        echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
    }

}

=============================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant