docx icon indicating copy to clipboard operation
docx copied to clipboard

Word export not working in iPhone - chrome browser with table header

Open sbpat123 opened this issue 3 years ago • 1 comments

Please refer below demo which is not working when using it in iPhone-chrome browser.

https://stackblitz.com/edit/angular-docx-j5gpmj?file=src/app/app.component.ts

If we remove below code(line 52 to 55), it is working. Hence, it seems some issue with table header. new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: headers, }),

Please help us on this issue.

Thank you.

sbpat123 avatar Dec 22 '21 17:12 sbpat123

Hello :)

First, please be careful with colors, you should not use leading hash tag, shading: { fill: '#A9A9A9' }, You can read on it on "breaking changes" on 7 release: https://github.com/dolanmiu/docx/releases/tag/7.0.0

I think also that hard times could give the style names that you use. It feels like you were planning to make some custom styling but I didn't find any in your code. And these 'body' and 'header' are missing from default styles. So check them too https://github.com/dolanmiu/docx/blob/9b840c0d63227818209036524fbc2c9fede145e7/src/file/styles/style/default-styles.ts

Nevertheless the example you gave is possible to open in standard word, I assume it just skips wrong values while iPhone has more strict rules.

If that helps with your problem please close the issue

anti-the-social avatar Jan 31 '22 12:01 anti-the-social