Closed ZeeshanAslam2016 closed 4 years ago
Hey! I try my package in angular9 / macOs10.15.5,and I can open the document in MS Word。
Here is my test code:
ngOnInit() {
const html = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>good</div>
</body>
</html>`;
asBlob(html).then(data => {
saveAs(data);
})
}
Maybe you are not using the correct html format, the html string should be a complete html document format including <!DOCTYPE html>
and <html><head><body>
label etc.
On mobile and mac when i try to open download file it always show me the message "The document could not be opened. The file isn’t in the correct format." I am using this with angular 8.