I want to open document file from my app to view in my application

this.fileOpener.open(’/assets/hello’, ‘application/rtf’)
.then(() => console.log(‘File is opened’))
.catch(e => console.log(‘Error openening file’, e));
I want to open that rtf file which is in assets folder in my app. I have used File Opener plugin. Now when i’m running app i got Error openening file – {status: “9”, message: “File does not exist”}.

Take a look in cordova-plugin-file. You have to give a valid path to the file so you can open by file opener. Try save the file in the Documents directory of the device for example.

Can i use the path from web url to view the file?
For Ex.
this.fileOpener.open(‘http://test.test.com/test.pdf’, ‘application/rtf’)

I don’t think so. File Opener Plugin is to open files on the device, if you want to open a file from url try window.open() or check plugin InAppBrowser.

By using inApp browser and window.open, file will open but i will not have full control of it.
That’s why i’m not using it.

In that case you need to download the file. Use cordova plugin file to download but ,as you know, you need the backend implementation so when you make the request, server can give you the file.

That’s the problem man, i need to show it without downloading the file.

Without downloading it I think you can not have control of it. What kind of control do you need?