diff -upr scribus-1.5.8.orig/scribus/plugins/import/pdf/importpdf.cpp scribus-1.5.8/scribus/plugins/import/pdf/importpdf.cpp --- scribus-1.5.8.orig/scribus/plugins/import/pdf/importpdf.cpp 2022-01-23 18:16:01.000000000 +0200 +++ scribus-1.5.8/scribus/plugins/import/pdf/importpdf.cpp 2022-03-02 14:03:29.851352471 +0200 @@ -90,7 +90,11 @@ QImage PdfPlug::readThumbnail(const QStr #endif globalParams->setErrQuiet(gTrue); +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + PDFDoc pdfDoc{std::make_unique(fname)}; +#else PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr}; +#endif if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted) return QImage(); @@ -343,7 +347,11 @@ bool PdfPlug::convert(const QString& fn) globalParams->setErrQuiet(gTrue); // globalParams->setPrintCommands(gTrue); QList ocgGroups; +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + auto pdfDoc = std::unique_ptr(new PDFDoc(std::make_unique(fname))); +#else auto pdfDoc = std::unique_ptr(new PDFDoc(fname, nullptr, nullptr, nullptr)); +#endif if (pdfDoc) { if (pdfDoc->getErrorCode() == errEncrypted) @@ -363,7 +371,11 @@ bool PdfPlug::convert(const QString& fn) auto fname = new GooString(QFile::encodeName(fn).data()); #endif auto userPW = new GooString(text.toLocal8Bit().data()); +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + pdfDoc.reset(new PDFDoc(std::make_unique(fname), GooString(userPW), GooString(userPW))); +#else pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr)); +#endif qApp->changeOverrideCursor(QCursor(Qt::WaitCursor)); } if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone))