diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index ec305b1ca..d7f521106 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -3935,6 +3935,40 @@ fn dynamic_xfa_forms_open_with_the_values_and_rows_of_their_data() { assert!(!doc.dirty); } +/// #3180: an XFA form with no fields whose configuration says `dynamicRender` is `forbidden` is a +/// static form: its pages are the form. Opening it used to lay the template out into new pages +/// and write them as a revision, so even a save with no change replaced the pages. +#[test] +fn an_xfa_form_without_fields_that_forbids_dynamic_rendering_keeps_its_pages() { + let config = r#"forbidden"#; + let template = pdfcraft_xfa::fixtures::template(1); + let with_config = template.replacen("