[pdf] Engine: say what pdfium's save keeps

This commit is contained in:
2026-11-16 13:58:20 +01:00
parent a06e3f9b73
commit 74292ae819
+2 -1
View File
@@ -42,7 +42,8 @@ impl Engine {
}
}
/// pdfium's save, with the security handler removed (Pictor re-encrypts with lopdf when asked).
/// pdfium's save (flags 0: an encrypted document would keep its security handler). Pictor only calls it on
/// unencrypted documents (the edit pipeline unlocks first) and on new ones (merge); lopdf writes encryption.
pub(crate) fn pdfium_save(doc: &PdfDocument) -> Result<Vec<u8>, PdfError> {
doc.save_to_bytes().map_err(|e| PdfError::Write(e.to_string()))
}