Open zemelLeong opened 1 month ago
I use this code read this file got the issue.
impl Template { pub fn new(path: String) -> errors::Result<Self> { let path = PathBuf::from(path); let mut buf: Vec<u8> = Vec::new(); File::open(path)?.read_to_end(&mut buf)?; let docx = docx_rs::read_docx(&buf)?; Ok(Self { docx }) } pub fn save(self, path: &str) { let path = std::path::Path::new(path); let file = std::fs::File::create(path).unwrap(); self.docx.build().pack(file).unwrap(); } } Template::new(path)?.save("./xxx.docx")
The 无法显示该图片 means cannot show this image.
无法显示该图片
I use this code read this file got the issue.
screenshot
The
无法显示该图片
means cannot show this image.