--- GDCM-3.0.24/Applications/Cxx/gdcminfo.cxx.orig	2024-05-03 14:12:32.000000000 +0200
+++ GDCM-3.0.24/Applications/Cxx/gdcminfo.cxx	2025-10-11 11:02:20.927582200 +0200
@@ -40,6 +40,7 @@
 #include <poppler/UnicodeMap.h>
 #include <poppler/PDFDocEncoding.h>
 #include <poppler/GlobalParams.h>
+#include <poppler/cpp/poppler-version.h>
 #endif // GDCM_USE_SYSTEM_POPPLER
 
 #include "puff.h"
@@ -297,7 +298,12 @@
       isUnicode = false;
       i = 0;
       }
+#if (POPPLER_VERSION_MAJOR > 25) || \
+    (POPPLER_VERSION_MAJOR == 25 && POPPLER_VERSION_MINOR >= 10)
+    while (i < obj.getString()->size())
+#else
     while (i < obj.getString()->getLength())
+#endif
       {
       if (isUnicode)
         {
--- GDCM-3.0.24/Applications/Cxx/gdcmpdf.cxx.orig	2024-05-03 14:12:32.000000000 +0200
+++ GDCM-3.0.24/Applications/Cxx/gdcmpdf.cxx	2025-10-11 11:01:06.335489100 +0200
@@ -25,6 +25,7 @@
 #include <poppler/UnicodeMap.h>
 #include <poppler/PDFDocEncoding.h>
 #include <poppler/GlobalParams.h>
+#include <poppler/cpp/poppler-version.h>
 #ifdef LIBPOPPLER_PDFDOC_HAS_OPTIONAL
 #include <poppler/PDFDocFactory.h>
 #endif
@@ -148,7 +149,12 @@
       isUnicode = false;
       i = 0;
       }
+#if (POPPLER_VERSION_MAJOR > 25) || \
+    (POPPLER_VERSION_MAJOR == 25 && POPPLER_VERSION_MINOR >= 10)
+    while (i < obj.getString()->size())
+#else
     while (i < obj.getString()->getLength())
+#endif
       {
       if (isUnicode)
         {
