1 year ago
#372405
shivam
The file "test.pdf" could not be opened on mac. [Ionic-iOS]
I am trying to save the pdf in iOS using the Ionic Filesystem. I am using the below functions for writing the files.
Filesystem.writeFile({
path: 'test',
data: EStatementConstant.BinData,
directory: Directory.Documents,
encoding: Encoding.UTF8,
});
Where EStatementConstant.BinData is my base64 data [validated] which I am getting directly from the API service.
The problem is that I am unable to open the file on a Mac. I didn't find any function to decode.
I am using capacitor v-3.
Note:- I am unable to save the pdf data without encoding in iOS. Also, I can not use the Cordova plugin. I am struggling with this for the last few days. Please help.
ios
angular
ionic-framework
ionic3
0 Answers
Your Answer