Skip to main content

Crate document_svg

Crate document_svg 

Source
Expand description

Memory-bounded conversion of PDF and OOXML documents to deterministic SVG, plus appearance-preserving SVG packaging into OOXML.

Use convert_path for normal file conversion. It detects PDF, PPTX, XLSX, or DOCX from the input extension, writes one SVG per output page, and writes conversion.json beside the SVG files.

Use the public ir and svg modules only when constructing a page from custom drawing data. Build an ir::Page, append ir::Node values in paint order, then pass it to svg::write_page. The format-specific pdf and ooxml modules are internal implementation details.

Call svg_to_openxml with one SVG or a directory of SVG pages to create PPTX, DOCX, or XLSX files containing those SVGs as vector images. This does not reconstruct the original Office document’s semantic structure.

Modules§

ir
Output-independent page model used by all input converters.
svg
Deterministic SVG serialization for the public crate::ir model.

Structs§

ConversionReport
ConvertOptions
PageReport
ReverseOptions
ReverseReport

Enums§

Error
OpenXmlFormat
SourceFormat

Functions§

convert_path
svg_to_openxml

Type Aliases§

Result