save_docx
Конвертирует и сохраняет ранее открытый PDF-document как DOCX-document.
pub fn save_docx(&self, filename: &str) -> Result<(), PdfError>
Arguments
- filename - the path to the output file
Returns
- Ok(()) - if the operation succeeds
- Err(PdfError) - if the operation fails
Example
use asposepdf::Document;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Откройте PDF‑документ с именем файла
let pdf = Document::open("sample.pdf")?;
// Конвертировать и сохранить ранее открытый PDF-document как DocX-document
pdf.save_docx("sample.docx")?;
Ok(())
}