diff --git a/crates/ui-egui/src/app/commands.rs b/crates/ui-egui/src/app/commands.rs index 86bed7fe6d..75d6ca817e 100644 --- a/crates/ui-egui/src/app/commands.rs +++ b/crates/ui-egui/src/app/commands.rs @@ -145,7 +145,7 @@ impl WordApp { // Web: saving and exporting become downloads. if self.services.download.is_some() && matches!(id, "file.save" | "file.saveAs" | "file.exportPdf" | "file.exportPng") { let name = params.get("path").and_then(Value::as_str).map(str::to_string).unwrap_or_else(|| self.web_save_name(id)); - let name = if id == "file.exportPdf" && !name.ends_with(".pdf") { format!("{name}.pdf") } else { name }; + let name = if id == "file.exportPdf" && !name.to_ascii_lowercase().ends_with(".pdf") { format!("{name}.pdf") } else { name }; // A save with a password encrypts this and later saves (`file.save`'s `password`). if matches!(id, "file.save" | "file.saveAs") && let Some(pw) = params.get("password").filter(|v| !v.is_null())