diff -Naur krename-5.0.2/cmake/modules/FindPoDoFo.cmake krename-5.0.2.new/cmake/modules/FindPoDoFo.cmake
--- krename-5.0.2/cmake/modules/FindPoDoFo.cmake	2022-08-31 23:22:21.000000000 +0200
+++ krename-5.0.2.new/cmake/modules/FindPoDoFo.cmake	2023-06-12 10:24:55.105774698 +0200
@@ -36,15 +36,8 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-find_path(PoDoFo_INCLUDE_DIRS
-  NAMES podofo/podofo.h
-)
-find_library(PoDoFo_LIBRARIES
-  NAMES libpodofo podofo
-)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PoDoFo DEFAULT_MSG PoDoFo_LIBRARIES PoDoFo_INCLUDE_DIRS)
+include(FindPkgConfig)
+pkg_search_module(PoDoFo libpodofo libpodofo-0)
 
 set(PoDoFo_DEFINITIONS)
 if(PoDoFo_FOUND)
@@ -61,17 +54,19 @@
     endif()
   endif()
 
-  # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public
-  # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will
-  # hopefully be released soon with 0.9.6. Note that krename doesn't use
-  # OpenSSL in any way.
-  file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
-  file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
-  file(STRINGS "${PoDoFo_INCLUDE_DIRS}/podofo/base/podofo_config.h" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$")
+  find_file(PoDoFo_CONFIG podofo_config.h PATHS ${PoDoFo_INCLUDE_DIRS} PATH_SUFFIXES auxiliary base)
+  file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
+  file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
+  file(STRINGS "${PoDoFo_CONFIG}" PoDoFo_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$")
   string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MAJOR_VER "${PoDoFo_MAJOR_VER_LINE}")
   string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+([0-9]+)$" "\\1" PoDoFo_MINOR_VER "${PoDoFo_MINOR_VER_LINE}")
   string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+([0-9]+)$" "\\1" PoDoFo_PATCH_VER "${PoDoFo_PATCH_VER_LINE}")
   set(PoDoFo_VERSION "${PoDoFo_MAJOR_VER}.${PoDoFo_MINOR_VER}.${PoDoFo_PATCH_VER}")
+
+  # PoDoFo-0.9.5 unconditionally includes openssl/opensslconf.h in a public
+  # header. The fix is in https://sourceforge.net/p/podofo/code/1830/ and will
+  # hopefully be released soon with 0.9.6. Note that krename doesn't use
+  # OpenSSL in any way.
   if(PoDoFo_VERSION VERSION_EQUAL "0.9.5")
     find_package(OpenSSL)
     if (OpenSSL_FOUND)
@@ -84,4 +79,8 @@
   endif()
 endif()
 
+if(PoDoFo_VERSION VERSION_GREATER_EQUAL 0.10.0)
+  set(CMAKE_CXX_STANDARD 17)
+endif()
+
 mark_as_advanced(PoDoFo_INCLUDE_DIRS PoDoFo_LIBRARIES PoDoFo_DEFINITIONS)
diff -Naur krename-5.0.2/src/podofoplugin.cpp krename-5.0.2.new/src/podofoplugin.cpp
--- krename-5.0.2/src/podofoplugin.cpp	2022-08-31 23:22:21.000000000 +0200
+++ krename-5.0.2.new/src/podofoplugin.cpp	2023-06-12 10:24:55.106774703 +0200
@@ -61,6 +61,25 @@
     try {
         PdfMemDocument doc;
         doc.Load(filename.toUtf8().data());
+#if (PODOFO_VERSION_MINOR>=10 || PODOFO_VERSION_MAJOR>=1)
+        const PdfInfo *info = doc.GetInfo();
+
+        if (token == "pdfauthor") {
+            return info->GetAuthor().has_value() ? QString::fromUtf8(info->GetAuthor()->GetString().c_str()) : QString();
+        } else if (token == "pdfcreator") {
+            return info->GetCreator().has_value() ? QString::fromUtf8(info->GetCreator()->GetString().c_str()) : QString();
+        } else if (token == "pdfkeywords") {
+            return info->GetKeywords().has_value() ? QString::fromUtf8(info->GetKeywords()->GetString().c_str()) : QString();
+        } else if (token == "pdfsubject") {
+            return info->GetSubject().has_value() ? QString::fromUtf8(info->GetSubject()->GetString().c_str()) : QString();
+        } else if (token == "pdftitle") {
+            return info->GetTitle().has_value() ? QString::fromUtf8(info->GetTitle()->GetString().c_str()) : QString();
+        } else if (token == "pdfproducer") {
+            return info->GetProducer().has_value() ? QString::fromUtf8(info->GetProducer()->GetString().c_str()) : QString();
+        } else if (token == "pdfpages") {
+            return QString::number(doc.GetPages().GetCount());
+        }
+#else
         PdfInfo *info = doc.GetInfo();
 
         if (token == "pdfauthor") {
@@ -78,6 +97,7 @@
         } else if (token == "pdfpages") {
             return QString::number(doc.GetPageCount());
         }
+#endif
     } catch (PdfError &error) {
         return QString::fromUtf8(error.what());
     }
