document_svg/lib.rs
1//! Memory-bounded conversion of PDF and OOXML documents to deterministic SVG,
2//! plus appearance-preserving SVG packaging into OOXML.
3//!
4//! Use [`convert_path`] for normal file conversion. It detects PDF, PPTX, XLSX,
5//! or DOCX from the input extension, writes one SVG per output page, and writes
6//! `conversion.json` beside the SVG files.
7//!
8//! Use the public [`ir`] and [`svg`] modules only when constructing a page from
9//! custom drawing data. Build an [`ir::Page`], append [`ir::Node`] values in
10//! paint order, then pass it to [`svg::write_page`]. The format-specific `pdf`
11//! and `ooxml` modules are internal implementation details.
12//!
13//! Call [`svg_to_openxml`] with one SVG or a directory of SVG pages to create
14//! PPTX, DOCX, or XLSX files containing those SVGs as vector images. This does
15//! not reconstruct the original Office document's semantic structure.
16
17mod convert;
18mod error;
19pub mod ir;
20mod ooxml;
21mod pdf;
22mod pdf_base14;
23mod reverse;
24pub mod svg;
25
26pub use convert::{ConversionReport, ConvertOptions, PageReport, SourceFormat, convert_path};
27pub use error::{Error, Result};
28pub use reverse::{OpenXmlFormat, ReverseOptions, ReverseReport, svg_to_openxml};