{"action":"created","issue":{"url":"https://api.github.com/repos/mike42/escpos-php/issues/64","labels_url":"https://api.github.com/repos/mike42/escpos-php/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/mike42/escpos-php/issues/64/comments","events_url":"https://api.github.com/repos/mike42/escpos-php/issues/64/events","html_url":"https://github.com/mike42/escpos-php/issues/64","id":113131454,"number":64,"title":"Windows/USB: Error Printing Receipt From Epson Printer Using Escpos-php, Please How can I Resolve This. Thank You","user":{"login":"Macwilcy","id":8780114,"avatar_url":"https://avatars.githubusercontent.com/u/8780114?v=3","gravatar_id":"","url":"https://api.github.com/users/Macwilcy","html_url":"https://github.com/Macwilcy","followers_url":"https://api.github.com/users/Macwilcy/followers","following_url":"https://api.github.com/users/Macwilcy/following{/other_user}","gists_url":"https://api.github.com/users/Macwilcy/gists{/gist_id}","starred_url":"https://api.github.com/users/Macwilcy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Macwilcy/subscriptions","organizations_url":"https://api.github.com/users/Macwilcy/orgs","repos_url":"https://api.github.com/users/Macwilcy/repos","events_url":"https://api.github.com/users/Macwilcy/events{/privacy}","received_events_url":"https://api.github.com/users/Macwilcy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mike42/escpos-php/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-24T03:02:23Z","updated_at":"2015-10-31T15:05:04Z","closed_at":null,"body":"mike42 Thanks so much for your help and time in making this available.\r\n\r\nI have tried to implement your codes and I have not seem to find a headway. I would really appreciate your help.\r\n\r\nI am using Epson TM-T20\r\n\r\nI tried the \"hello word\" world test script above and it gave this error :\r\n\r\n```\r\n\"Warning: copy(\\\\MGC-LTD-PC\\ESDPRT001): failed to open stream: No such file or directory in C:\\xampp\\htdocs\\jamiykeboutique\\lib\\src\\WindowsPrintConnector.php on line 339\r\nCouldn't print to this printer: Failed to copy file to printer\"\r\n```\r\n\r\nPlease, how do I resolve this and make the printer to print. The code I used is below\r\n\r\n```php\r\n<?php\r\nrequire_once(\"lib/Escpos.php\");\r\n/**\r\n * Install the printer using USB printing support, and the \"Generic / Text Only\" driver,\r\n * then share it (you can use a firewall so that it can only be seen locally).\r\n * \r\n * Use a WindowsPrintConnector with the share name to print.\r\n * \r\n * Troubleshooting: Fire up a command prompt, and ensure that (if your printer is shared as\r\n * \"Receipt Printer), the following commands work:\r\n * \r\n *      echo \"Hello World\" > testfile\r\n *      print /D:\"\\\\%COMPUTERNAME%\\Receipt Printer\" testfile\r\n *      del testfile\r\n */\r\ntry {\r\n    // Enter the share name for your USB printer here\r\n    $connector = new WindowsPrintConnector(\"ESDPRT001\");\r\n    /* Print a \"Hello world\" receipt\" */\r\n    $printer = new Escpos($connector);\r\n    $printer -> text(\"Hello World!\\n\");\r\n    $printer -> cut();\r\n\r\n    /* Close printer */\r\n    $printer -> close();\r\n} catch(Exception $e) {\r\n    echo \"Couldn't print to this printer: \" . $e -> getMessage() . \"\\n\";\r\n}\r\n\r\n?>\r\n```\r\n\r\nIt seems you have change your codes in regarding the WindowsPrintConnector(). The link to the one you gave above and the one in the master folder I downloaded are not looking alike\r\n\r\nPlease Note : I tried to share the Epson TM-T20 printer as you describe in your blog, but it kept on saying \"Another printer shared already have the same name\". \r\n\r\nPlease, how can I implement your code so It will work for me. Thank so much\r\n"},"comment":{"url":"https://api.github.com/repos/mike42/escpos-php/issues/comments/152741472","html_url":"https://github.com/mike42/escpos-php/issues/64#issuecomment-152741472","issue_url":"https://api.github.com/repos/mike42/escpos-php/issues/64","id":152741472,"user":{"login":"PanJ","id":1797879,"avatar_url":"https://avatars.githubusercontent.com/u/1797879?v=3","gravatar_id":"","url":"https://api.github.com/users/PanJ","html_url":"https://github.com/PanJ","followers_url":"https://api.github.com/users/PanJ/followers","following_url":"https://api.github.com/users/PanJ/following{/other_user}","gists_url":"https://api.github.com/users/PanJ/gists{/gist_id}","starred_url":"https://api.github.com/users/PanJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PanJ/subscriptions","organizations_url":"https://api.github.com/users/PanJ/orgs","repos_url":"https://api.github.com/users/PanJ/repos","events_url":"https://api.github.com/users/PanJ/events{/privacy}","received_events_url":"https://api.github.com/users/PanJ/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T15:05:04Z","updated_at":"2015-10-31T15:05:04Z","body":"@mike42 The regex is broken. I recommend `^\\w+[\\s\\w-]*\\w+$`"}}