Loading and saving Flat LibreOffice Text document makes it unreadable:
fn main() {
let xml = std::fs::read_to_string("template.fodt").expect("Failed to open");
let doc = sxd_document::parser::parse(&xml).expect("Failed to parse");
let mut output = Vec::new();
sxd_document::writer::format_document(&doc.as_document(), &mut output).expect("unable to output XML");
std::fs::write("output.fodt", &output).expect("Failed to write");
}
The very minimal template file is attached (but zipped because of Github).
template.fodt.zip
Loading and saving Flat LibreOffice Text document makes it unreadable:
The very minimal template file is attached (but zipped because of Github).
template.fodt.zip