docx
docx copied to clipboard
Exported documents's alignment doesn't work in Apple Pages
When opening exported docx files (docx version 8.1.0) in Apple Pages, paragraph alignment doesn't work - it always defaults to the left. I tried centering the document and exporting it to docx via Apple Pages, then swapping document.xml in the old export for the new one, but it didn't fix anything :/ I'm happy to provide any necessary files to resolve this bug asap :)
Could you send the code as minimal reproduction steps?
I'm having the same issue - alignment works fine in Google Docs, but is ignored by Pages. Here's a simplified example from my project:
new Document({
sections: [
{
children: [
new Paragraph({
alignment: AlignmentType.RIGHT,
children: [
new TextRun({
text: 'This should be right aligned',
}),
],
}),
new Paragraph({
text: 'This should be left aligned',
heading: HeadingLevel.HEADING_1,
}),
],
},
],
})
Pages:
Google Docs:
Same here. Seems tons of things don't work with Pages - borders, indent, alignment
Commenting for relevance, this is still an issue today. Alignment seems to work everywhere but Pages.