pub const OFD_NAMESPACE: &str = "http://www.ofdspec.org/2016";
pub const OFD_PREFIX: &str = "ofd";
pub const OFD_ROOT_ELEMENT: &str = "OFD";
pub const DOCUMENT_ELEMENT: &str = "Document";
pub const PAGE_ELEMENT: &str = "Page";
pub const PAGES_ELEMENT: &str = "Pages";
pub const DOC_BODY_ELEMENT: &str = "DocBody";
pub const RES_ELEMENT: &str = "Res";
pub const DEFAULT_PAGE_WIDTH_MM: f64 = 210.0;
pub const DEFAULT_PAGE_HEIGHT_MM: f64 = 297.0;
pub const OFD_VERSION: &str = "1.0";
pub const TEXT_OBJECT_ELEMENT: &str = "TextObject";
pub const PATH_OBJECT_ELEMENT: &str = "PathObject";
pub const IMAGE_OBJECT_ELEMENT: &str = "ImageObject";
pub const COMPOSITE_OBJECT_ELEMENT: &str = "CompositeObject";
pub const LAYER_ELEMENT: &str = "Layer";
pub const SIGNATURE_ELEMENT: &str = "Signature";
pub const STAMP_ANNOT_ELEMENT: &str = "StampAnnot";
pub const ATTACHMENT_ELEMENT: &str = "Attachment";
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_ofd_namespace() {
assert_eq!(OFD_NAMESPACE, "http://www.ofdspec.org/2016");
}
#[test]
fn test_default_page_size() {
assert!((DEFAULT_PAGE_WIDTH_MM - 210.0).abs() < f64::EPSILON);
assert!((DEFAULT_PAGE_HEIGHT_MM - 297.0).abs() < f64::EPSILON);
}
#[test]
fn test_element_names() {
assert_eq!(OFD_ROOT_ELEMENT, "OFD");
assert_eq!(PAGE_ELEMENT, "Page");
assert_eq!(TEXT_OBJECT_ELEMENT, "TextObject");
}
}