Skip to content
Pezhman’s Gallery
فا

RTL document conversion

MdPersia

A collaborative desktop, CLI and Python tool for converting RTL Markdown into editable Word files and PDF.

Pezhman Karim Sarmadi’s roleOpen-source contributor
The Persian word for text printed on a lined page

Keep structure through an RTL export

The tool handles mixed Persian and Latin text, tables, code, callouts and Mermaid diagrams. Use the desktop interface, automate via CLI or import the Python API.

Layout and diagrams

Mixed scripts, RTL tables and Mermaid

  • Preserve direction

    Normalize Markdown direction and handle mixed-script runs before building the document.

  • Render diagrams

    Render flow, sequence, class and Gantt diagrams with the documented local toolchain.

Export and automation

Word, PDF and reusable conversion settings

  • Choose an entry point

    Convert interactively or reuse options in scripts and CI, including typography and page layout.

Product views

Conversion workspace
Conversion workspace

The documented desktop interface in light mode.

Open in gallery
Dark workspace
Dark workspace

The documented desktop interface in dark mode.

Open in gallery

Architecture and tools

How Persian and code stay in the right order

  1. Find right-to-left text

    The Markdown transformation detects Persian and Arabic in headings and paragraphs and adds a direction wrapper.

  2. Preserve technical blocks

    Fenced code, display math and frontmatter are preserved. Reapplying the transformation avoids adding duplicate wrappers.

  3. Choose the output

    Export Word or PDF through the desktop, CLI or Python API. A separate mode keeps the output as RTL Markdown.

Conversion engine

Python tooling for document output and browser-based rendering.

  • Python
  • python-docx
  • Playwright
  • Mermaid

Project links