Skip to main content

Crate rdocx

Crate rdocx 

Source
Expand description

High-level API for reading, writing, and converting DOCX documents.

Provides a Python-docx-like interface for working with Word documents.

§Examples

use rdocx::Document;

// Create a new document
let mut doc = Document::new();
doc.add_paragraph("Hello, World!");
doc.save("output.docx").unwrap();

// Open an existing document
let doc = Document::open("existing.docx").unwrap();
for para in doc.paragraphs() {
    println!("{}", para.text());
}

Re-exports§

pub use paragraph::Alignment;
pub use paragraph::BorderStyle;
pub use paragraph::Paragraph;
pub use paragraph::ParagraphRef;
pub use paragraph::SectionBreak;
pub use paragraph::TabAlignment;
pub use paragraph::TabLeader;
pub use run::Run;
pub use run::RunRef;
pub use run::UnderlineStyle;
pub use style::Style;
pub use style::StyleBuilder;
pub use table::Cell;
pub use table::CellRef;
pub use table::Row;
pub use table::RowRef;
pub use table::Table;
pub use table::TableRef;
pub use table::VerticalAlignment;

Modules§

paragraph
Paragraph — a block-level container for runs of text.
run
Run — a contiguous stretch of text with uniform formatting.
style
Style access and manipulation for documents.
table
Table — a block-level container for rows and cells of content.

Structs§

AccessibilityIssue
An accessibility issue found during audit.
Document
A Word document (.docx file).
ImageInfo
Information about an image in the document.
Length
A length measurement that can be expressed in various units.
LinkInfo
Information about a hyperlink in the document.
OutlineNode
A node in the document outline tree.

Enums§

Error
IssueSeverity
Severity level for accessibility issues.

Type Aliases§

Result