Skip to main content

Crate extend_docx

Crate extend_docx 

Source
Expand description

Native and WebAssembly-compatible Word document parsing, modeling, and serialization.

Re-exports§

pub use doc::is_doc_format;
pub use doc::parse_doc;
pub use parse::build_doc_model;
pub use source_graph::document_source_graph;
pub use source_graph::DocumentSourceGraph;
pub use structured::extract_document_blocks;
pub use structured::extract_document_blocks_with_options;
pub use structured::BlockDetails;
pub use structured::BlockType;
pub use structured::DocumentBlock;
pub use structured::DocumentWord;
pub use structured::ExtractDocumentBlocksOptions;
pub use structured::ParagraphDetails;
pub use structured::ParagraphInline;
pub use structured::SourceRef;
pub use structured::StructuredDocument;
pub use structured::TableCellDetails;
pub use serialize::can_preserve_image_paint_source;
pub use serialize::model_to_document_xml;
pub use serialize::serialize_doc_model;
pub use serialize::serialize_docx;
pub use serialize::try_serialize_doc_model;
pub use serialize::validate_image_paint_bounds;
pub use zip::create_minimal_docx_package;
pub use zip::package_to_bytes;
pub use zip::parse_docx;
pub use model::*;
pub use package::*;

Modules§

doc
Legacy Word 97-2003 binary .doc parser ([MS-DOC]).
emf
EMF (Enhanced Metafile) to SVG conversion for the vector path-drawing record subset: window/viewport mapping, paths, solid brushes/pens, positioned Unicode text, solid raster-operation fills, saved device contexts, fill modes, and clipping. Records outside the supported set abort the conversion so the caller can fall back to the unsupported-image placeholder instead of rendering something wrong.
model
package
parse
serialize
DOCX serializer ported from packages/serializer/src/index.ts.
source_graph
structured
table_grid
xml
XML parsing utilities ported from packages/doc-model/src/index.ts.
zip

Functions§

parse_document_blocks
parse_document_blocks_with_options
parse_document_bytes
Parses either a DOCX (OOXML zip) or a legacy Word 97-2003 binary .doc file, detected by magic bytes, into the same in-memory package shape.