1
Good afternoon.
I am trying to send a simple txt file to the network printer. The server is Windows, php 5.6 and is in a VPS. The printer is configured by VPN.
I tried installing the php_printer dll, but PHP did not recognize the library.
If I send via CMD, using the command below, it works:
Get-Content ".txt file" | Out-Printer Network Printer
However, running this same command via exec in PHP will not. I have tried using Systema, passthru, etc. nothing works.
Does anyone have any light for this case? I thank you in advance.
What would be the result of: exec('Get-Content ".txt file" | Out-Printer network printer 2>&1', $output); print_r($output); ?
– Diego Schmidt
Appeared array();
– Gisele Zerbinati
I did it this way. error_reporting(E_ALL); $printer = "SCX-3400"; $command = "Get-Content map.txt | Out-Printer $printer"; exec($command, $output); print_r($output);
– Gisele Zerbinati