Skip to content

Table direction RTL not supported in generated Word documents #1502

@Soheil1996-max

Description

@Soheil1996-max

Issue Summary

When creating Word tables using python-docx, setting paragraphs or runs to right-to-left (RTL) alignment works inside the cells. However, the table itself remains left-to-right (LTR) in layout.

This means the column order is reversed, and the first column (e.g., row number) appears on the left instead of the right. This is problematic for documents in RTL languages like Persian, Arabic, or Hebrew.

Steps to Reproduce

  1. Create a table with doc.add_table(rows=1, cols=3)
  2. Set paragraph alignment and bidi/textDirection to RTL
  3. Save the document
  4. Open the .docx in Word — the table layout remains LTR.

Expected Behavior

The table should support RTL direction fully, where:

  • Columns flow from right to left.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy