I am trying to print php generated page using 2Printer(Free Version) from fcoder.zendesk.com. I used the following codes to do the task:
<?php
exec("2Printer.exe -s 'text.php' -alert_no");
//shell_exec("2Printer.exe -s 'text.php' -alert_no");
//system("2Printer.exe -s 'text.php' -alert_no");
None of the above codes work and does not output any errors as well. I tried it with a text file (.txt), still it is not working. But from the normal command window (cmd), the printing is working. Is there anyone having experience with 2printer, please help.
1) Please be sure that your source folder and your printer are accessible from the account you call 2Printer.
2) Just for experiment, please try call 2Printer to print JPEG or PNG image file.
Same problem here.
exec("2Printer.exe -s 'text.php' '-alert_no' 2>&1",$output); var_dump($output);
I alway get:
Der Befehl "2Printer" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
It does not know the command: '2Printer' even with '2Printer.exe' it is not working. :(