1 diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
2 index ad6320139..e5f6d9c68 100644
3 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
4 +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
5 @@ -138,6 +138,15 @@ int main(int argc, char **argv)
6 _setmode( _fileno( g_binary_out ), _O_BINARY );
9 +#if POPPLER_CHECK_VERSION(22, 3, 0)
10 + PDFDoc aDoc( std::make_unique<GooString>(pFileName),
11 + GooString(pOwnerPasswordStr),
12 + GooString(pUserPasswordStr) );
14 + PDFDoc aErrDoc( std::make_unique<GooString>(pErrFileName),
15 + GooString(pOwnerPasswordStr),
16 + GooString(pUserPasswordStr) );
18 PDFDoc aDoc( pFileName,
21 @@ -145,6 +154,7 @@ int main(int argc, char **argv)
22 PDFDoc aErrDoc( pErrFileName,
27 // Check various permissions for aDoc.
28 PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;