Rust document renderer

Convert DOCX with complex scripts in mind.

A DOCX-to-PDF renderer combining dxpdf layout with an enhanced Krilla backend and PDF Logical Unit V4 for Unicode text semantics, complex-script shaping, and high-fidelity output.

Rendering architecture

A modular path from OOXML to semantic PDF.

W

DOCX interpretation

A forked dxpdf layer reads WordprocessingML and produces the document layout used by the bridge.

IR

Renderer-neutral bridge

The Typsastra bridge translates layout into a dedicated rendering intermediate representation.

PDF

Enhanced output

Enhanced Krilla shapes complex scripts and writes visual PDF content with logical Unicode semantics.

Data flow

Clear stages make the renderer inspectable.

The architecture separates document interpretation, layout bridging, rendering intent, and PDF serialization so each boundary can be tested independently.

Current inspection is partial, not complete design verification. Some regions, typography, drawings, and complete overflow behavior remain pending.
DOCX bytesOOXML package
Forked dxpdflayout
typsastra-dxpdf bridgetranslation
typsastra-render IRrender intent
Enhanced Krillasemantic PDF
# Rust stable toolchain required
git clone https://github.com/Sovichea/typsastra-docx.git
cd typsastra-docx
cargo build -p typsastra-docx

# Convert a document
cargo run -p typsastra-docx -- input.docx output.pdf

// Or call the Rust API
let pdf = typsastra_docx::convert(&docx_bytes)?;

Quick start

Convert a DOCX from the workspace.

Clone the repository, build the command-line package, and provide input and output paths. Cargo fetches the pinned dependencies on the first build.

  • use a new output path for inspection commands
  • review the generated PDF in a compatible viewer
  • call the byte-oriented API when embedding the renderer in Rust
The development CLI is not yet hardened as an untrusted-document service. Standalone distribution packaging is also pending.

For developers

Explore complex-script DOCX rendering in Rust.

Review the workspace architecture, supported behavior, fixtures, and current limitations in the repository.