Question: Printer type **hp officejet pro 6830**  

Is there a way to scan from html/java script image from a scanner ?  

If it cant be done can anyone recommend a **lib** for java that give access to the printer/scanner.

The over all idea is to add a **button** to web page and scan image back to the page or to a local folder 

I already tried using **Scanner.js**: HTML/JavaScript Web Twain WIA 

but it didnt work for me not sure why?

thanks

Answer: 
If you don't want to modify your Webpack configuration, the quick/dirty solution is to use the raw-loader import syntax:

`template: require('!raw-loader!./your-template.html')`
I've created a method utility to solve this issue.
Basically it adds the template url content to angular's templateCache,
using requireJS and "text.js":

```
   initTemplateUrls(templateUrlList) {
    app.run(function ($templateCache) {
      templateUrlList.forEach(templateUrl => {
        if ($templateCache.get(templateUrl) === undefined) {
          $templateCache.put(templateUrl, 'temporaryValue');
          require(['text!' + templateUrl],
            function (templateContent) {
              $templateCache.put(templateUrl, templateContent);
            }
          );
        }
      });
    });

```

What you should do is put this method utility in appmodule.ts for example, and then create a list of templateUrls that you are about to upgrade from your angular directive, for example:

```
const templateUrlList = [
      '/app/@fingerprint@/common/directives/grid/pGrid.html',
    ];

```