summaryrefslogtreecommitdiffstats
path: root/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx')
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 48d6160a8c10..7952adbcf206 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -119,6 +119,15 @@ int main(int argc, char **argv)
_setmode( _fileno( g_binary_out ), _O_BINARY );
#endif
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ PDFDoc aDoc( std::make_unique<GooString>(pFileName),
+ boost::optional<GooString>(pOwnerPasswordStr),
+ boost::optional<GooString>(pUserPasswordStr) );
+
+ PDFDoc aErrDoc( std::make_unique<GooString>(pErrFileName),
+ boost::optional<GooString>(pOwnerPasswordStr),
+ boost::optional<GooString>(pUserPasswordStr) );
+#else
PDFDoc aDoc( pFileName,
pOwnerPasswordStr,
pUserPasswordStr );
@@ -126,6 +135,7 @@ int main(int argc, char **argv)
PDFDoc aErrDoc( pErrFileName,
pOwnerPasswordStr,
pUserPasswordStr );
+#endif
// Check various permissions for aDoc.
PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;