pub mod config;
pub mod defaults;
pub mod error;
pub mod ir;
pub mod parser;
#[cfg(feature = "pdf-ops")]
pub mod pdf_ops;
pub mod render;
#[cfg(feature = "wasm")]
pub mod wasm;
use config::{ConvertOptions, Format};
use error::{ConvertError, ConvertResult};
#[path = "lib_pipeline.rs"]
mod pipeline;
#[cfg(test)]
#[path = "lib_test_support.rs"]
mod test_support;
#[cfg(test)]
fn is_ole2(data: &[u8]) -> bool {
pipeline::is_ole2(data)
}
#[cfg(not(target_arch = "wasm32"))]
#[cfg(test)]
fn should_resolve_font_context(doc: &ir::Document, options: &ConvertOptions) -> bool {
pipeline::should_resolve_font_context(doc, options, false)
}
#[cfg(not(target_arch = "wasm32"))]
pub fn convert(path: impl AsRef<std::path::Path>) -> Result<ConvertResult, ConvertError> {
pipeline::convert(path)
}
#[cfg(not(target_arch = "wasm32"))]
pub fn convert_with_options(
path: impl AsRef<std::path::Path>,
options: &ConvertOptions,
) -> Result<ConvertResult, ConvertError> {
pipeline::convert_with_options(path, options)
}
pub fn convert_bytes(
data: &[u8],
format: Format,
options: &ConvertOptions,
) -> Result<ConvertResult, ConvertError> {
pipeline::convert_bytes(data, format, options)
}
pub fn render_document(doc: &ir::Document) -> Result<Vec<u8>, ConvertError> {
pipeline::render_document(doc)
}
#[cfg(test)]
#[path = "lib_pipeline_tests.rs"]
mod pipeline_tests;
#[cfg(test)]
#[path = "lib_render_tests.rs"]
mod render_tests;
#[cfg(test)]
#[path = "lib_conversion_tests.rs"]
mod conversion_tests;
#[cfg(test)]
#[path = "lib_robustness_tests.rs"]
mod robustness_tests;
#[cfg(all(test, feature = "typescript"))]
#[path = "lib_ts_integration_tests.rs"]
mod ts_integration_tests;
#[cfg(all(test, feature = "pdf-ops"))]
#[path = "lib_streaming_tests.rs"]
mod streaming_tests;