diff -ru libreoffice-25.8.2.2.orig/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx libreoffice-25.8.2.2/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
--- libreoffice-25.8.2.2.orig/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx	2025-10-11 20:54:07.252799037 +0200
+++ libreoffice-25.8.2.2/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx	2025-10-11 22:24:49.001985722 +0200
@@ -216,9 +216,15 @@
                                                   : nullptr));
 #if POPPLER_CHECK_VERSION(22, 6, 0)
                     pDocUnique = std::unique_ptr<PDFDoc>(
+#if POPPLER_CHECK_VERSION(25, 10, 0)
+                        new PDFDoc(pFileName->copy(),
+                                   pOwnerPasswordStr ? std::optional<GooString>(pOwnerPasswordStr->toStr()) : std::nullopt,
+                                   pUserPasswordStr ? std::optional<GooString>(pUserPasswordStr->toStr()) : std::nullopt));
+#else
                         new PDFDoc(std::make_unique<GooString>(pFileName),
                                    std::optional<GooString>(pOwnerPasswordStr),
                                    std::optional<GooString>(pUserPasswordStr)));
+#endif
 #else
                     pDocUnique = std::unique_ptr<PDFDoc>(
                         new PDFDoc(pFileName, pOwnerPasswordStr, pUserPasswordStr));
