Marcelh1983 / angular-document-viewer

MIT License
62 stars 23 forks source link

Offline #12

Closed SIRAAJ-UI closed 4 years ago

SIRAAJ-UI commented 5 years ago

Hi Marcelh,

Is this working offline?, example if i dont have internet connection at some point? Currently i need to check the offline version also.

Thanks & Regards, SK

Marcelh1983 commented 4 years ago

The document are sent to the google or office viewer. You have be online for that. This cannot be changed

Marcelh1983 commented 4 years ago

Hi @whitegoat npm i ngx-doc-viewer@next will have the mammoth viewer. Which converts docx to html locally. Also add mammoth:

npm install mammoth --save

and make sure mammoth.browser.min.js is loaded. For the angular/cli you would add the following in angular.json:

    "scripts": [
        "node_modules/mammoth/mammoth.browser.min.js"
    ]

See the demo site in local-files branch for example code.