1pub const OFD_NAMESPACE: &str = "http://www.ofdspec.org/2016";
11
12pub const OFD_PREFIX: &str = "ofd";
14
15pub const OFD_ROOT_ELEMENT: &str = "OFD";
17
18pub const DOCUMENT_ELEMENT: &str = "Document";
20
21pub const PAGE_ELEMENT: &str = "Page";
23
24pub const PAGES_ELEMENT: &str = "Pages";
26
27pub const DOC_BODY_ELEMENT: &str = "DocBody";
29
30pub const RES_ELEMENT: &str = "Res";
32
33pub const DEFAULT_PAGE_WIDTH_MM: f64 = 210.0;
35
36pub const DEFAULT_PAGE_HEIGHT_MM: f64 = 297.0;
38
39pub const OFD_VERSION: &str = "1.0";
41
42pub const TEXT_OBJECT_ELEMENT: &str = "TextObject";
44
45pub const PATH_OBJECT_ELEMENT: &str = "PathObject";
47
48pub const IMAGE_OBJECT_ELEMENT: &str = "ImageObject";
50
51pub const COMPOSITE_OBJECT_ELEMENT: &str = "CompositeObject";
53
54pub const LAYER_ELEMENT: &str = "Layer";
56
57pub const SIGNATURE_ELEMENT: &str = "Signature";
59
60pub const STAMP_ANNOT_ELEMENT: &str = "StampAnnot";
62
63pub const ATTACHMENT_ELEMENT: &str = "Attachment";
65
66#[cfg(test)]
67mod tests {
68 use super::*;
69
70 #[test]
71 fn test_ofd_namespace() {
72 assert_eq!(OFD_NAMESPACE, "http://www.ofdspec.org/2016");
73 }
74
75 #[test]
76 fn test_default_page_size() {
77 assert!((DEFAULT_PAGE_WIDTH_MM - 210.0).abs() < f64::EPSILON);
78 assert!((DEFAULT_PAGE_HEIGHT_MM - 297.0).abs() < f64::EPSILON);
79 }
80
81 #[test]
82 fn test_element_names() {
83 assert_eq!(OFD_ROOT_ELEMENT, "OFD");
84 assert_eq!(PAGE_ELEMENT, "Page");
85 assert_eq!(TEXT_OBJECT_ELEMENT, "TextObject");
86 }
87}