diff --git a/crates/pdf/src/engine.rs b/crates/pdf/src/engine.rs index 8a308b0..f0acc3b 100644 --- a/crates/pdf/src/engine.rs +++ b/crates/pdf/src/engine.rs @@ -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, PdfError> { doc.save_to_bytes().map_err(|e| PdfError::Write(e.to_string())) }