Marcelh1983 / angular-document-viewer

MIT License
62 stars 23 forks source link

Can't Open blob object in html iframe #22

Closed sagaraher closed 4 years ago

sagaraher commented 4 years ago

Hi Team , I am struggling with blob object integration with this plugin . I can open blob object .xlsx .ppt .doc file in this plugin .

sagaraher commented 4 years ago

Hi Team , I am struggling with blob object integration with this plugin . I can't open or view blob object from .xlsx .ppt .doc file in html by using this plugin .

Marcelh1983 commented 4 years ago

Hi @sagaraher , because the library uses the online google or office viewer the url needs to be available publicly. I'm working on solution to be able to view documents that are only available locally, but that preview will have some limitations. I hope I can publish a beta version today.

Marcelh1983 commented 4 years ago

Hi @sagaraher the latest version will have the mammoth viewer.

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.

Please let me know if this is useful for you.