diff --git a/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php b/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php index 21ef982e..28d6f806 100644 --- a/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php +++ b/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php @@ -193,7 +193,7 @@ protected function finalizeLinux($data) if ($this -> userPassword == null) { // No password $command = sprintf( - "smbclient %s -U %s -c %s -N", + "smbclient %s -U %s -c %s -N -m SMB2", escapeshellarg($device), escapeshellarg($user), escapeshellarg("print -") @@ -202,14 +202,14 @@ protected function finalizeLinux($data) } else { // With password $command = sprintf( - "smbclient %s %s -U %s -c %s", + "smbclient %s %s -U %s -c %s -m SMB2", escapeshellarg($device), escapeshellarg($this -> userPassword), escapeshellarg($user), escapeshellarg("print -") ); $redactedCommand = sprintf( - "smbclient %s %s -U %s -c %s", + "smbclient %s %s -U %s -c %s -m SMB2", escapeshellarg($device), escapeshellarg("*****"), escapeshellarg($user), @@ -219,7 +219,7 @@ protected function finalizeLinux($data) } else { // No authentication information at all $command = sprintf( - "smbclient %s -c %s -N", + "smbclient %s -c %s -N -m SMB2", escapeshellarg($device), escapeshellarg("print -") ); @@ -242,7 +242,7 @@ protected function finalizeMac($data) { throw new Exception("Mac printing not implemented."); } - + /** * Send data to printer -- platform-specific Windows code. * @@ -298,7 +298,7 @@ protected function finalizeWin($data) } } } - + /** * @return string Current platform. Separated out for testing purposes. */ @@ -312,7 +312,7 @@ protected function getCurrentPlatform() } return self::PLATFORM_LINUX; } - + /* (non-PHPdoc) * @see PrintConnector::read() */ @@ -321,7 +321,7 @@ public function read($len) /* Two-way communication is not supported */ return false; } - + /** * Run a command, pass it data, and retrieve its return value, standard output, and standard error. * @@ -359,7 +359,7 @@ protected function runCommand($command, &$outputStr, &$errorStr, $inputStr = nul return -1; } } - + /** * Copy a file. Separated out so that nothing is actually printed during test runs. * @@ -371,7 +371,7 @@ protected function runCopy($from, $to) { return copy($from, $to); } - + /** * Write data to a file. Separated out so that nothing is actually printed during test runs. *