docx icon indicating copy to clipboard operation
docx copied to clipboard

Exported documents's alignment doesn't work in Apple Pages

Open karolsitarz opened this issue 2 years ago • 6 comments

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 :)

karolsitarz avatar Jun 28 '23 10:06 karolsitarz

Could you send the code as minimal reproduction steps?

dolanmiu avatar Jun 28 '23 20:06 dolanmiu

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:

Screenshot 2023-07-10 at 10 29 47 AM

Google Docs:

Screenshot 2023-07-10 at 10 30 15 AM

annabushsoftware avatar Jul 10 '23 14:07 annabushsoftware

Same here. Seems tons of things don't work with Pages - borders, indent, alignment

sjurgis avatar Jan 09 '24 06:01 sjurgis

Commenting for relevance, this is still an issue today. Alignment seems to work everywhere but Pages.

ftairs avatar Jul 03 '24 21:07 ftairs