Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167668499
D56472.id175766.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
64 KB
Referenced Files
None
Subscribers
None
D56472.id175766.diff
View Options
diff --git a/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h
new file mode 100644
--- /dev/null
+++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.h
@@ -0,0 +1,14 @@
+--- filters/karbon/pdf/SvgOutputDev.h.orig 2026-04-09 04:19:06 UTC
++++ filters/karbon/pdf/SvgOutputDev.h
+@@ -44,7 +44,11 @@ class SvgOutputDev : public OutputDev (public)
+ void eoFill(GfxState *state) override;
+
+ // text
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+ void drawString(GfxState *state, const GooString *s) override;
++#else
++ void drawString(GfxState *state, const std::string &s) override;
++#endif
+
+ // images
+ void drawImage(GfxState *state,
diff --git a/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp
new file mode 100644
--- /dev/null
+++ b/editors/calligra/files/patch-filters_karbon_pdf_SvgOutputDev.cpp
@@ -0,0 +1,44 @@
+--- filters/karbon/pdf/SvgOutputDev.cpp.orig 2026-04-09 04:19:06 UTC
++++ filters/karbon/pdf/SvgOutputDev.cpp
+@@ -386,7 +386,11 @@ QString SvgOutputDev::printStroke()
+ return stroke;
+ }
+
++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+ void SvgOutputDev::drawString(GfxState *state, const GooString *s)
++#else
++void SvgOutputDev::drawString(GfxState *state, const std::string &s)
++#endif
+ {
+ int render = state->getRender();
+ // check for invisible text -- this is used by Acrobat Capture
+@@ -397,8 +401,10 @@ void SvgOutputDev::drawString(GfxState *state, const G
+ // ignore empty strings
+ #if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(25, 10, 0)
+ if (s->getLength() == 0) {
+-#else
++#elif POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
+ if (s->size() == 0) {
++#else
++ if (s.empty()) {
+ #endif
+ return;
+ }
+@@ -407,11 +413,15 @@ void SvgOutputDev::drawString(GfxState *state, const G
+
+ QString str;
+
+- const char *p = s->c_str();
+ #if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(25, 10, 0)
++ const char *p = s->c_str();
+ int len = s->getLength();
+-#else
++#elif POPPLER_VERSION_MACRO < QT_VERSION_CHECK(26, 4, 0)
++ const char *p = s->c_str();
+ int len = s->size();
++#else
++ const char *p = s.c_str();
++ int len = s.size();
+ #endif
+ CharCode code;
+ const Unicode *u = nullptr;
diff --git a/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.hxx b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.hxx
new file mode 100644
--- /dev/null
+++ b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.hxx
@@ -0,0 +1,13 @@
+--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig 2026-04-17 11:34:08 UTC
++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+@@ -260,7 +260,9 @@ void setDefaultCTM(const std::array<double, 6> &pMat)
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen) override;
+ #endif
+-#if POPPLER_CHECK_VERSION(0, 64, 0)
++#if POPPLER_CHECK_VERSION(26, 4, 0)
++ virtual void drawString(GfxState *state, const std::string &s) override;
++#elif POPPLER_CHECK_VERSION(0, 64, 0)
+ virtual void drawString(GfxState *state, const GooString *s) override;
+ #else
+ virtual void drawString(GfxState *state, GooString *s) override;
diff --git a/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx
new file mode 100644
--- /dev/null
+++ b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx
@@ -0,0 +1,13 @@
+--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig 2026-04-17 11:12:42 UTC
++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -1114,7 +1114,9 @@ void PDFOutDev::drawChar(GfxState *state, double x, do
+ printf( "\n" );
+ }
+
+-#if POPPLER_CHECK_VERSION(0, 64, 0)
++#if POPPLER_CHECK_VERSION(26, 4, 0)
++void PDFOutDev::drawString(GfxState*, const std::string& /*s*/)
++#elif POPPLER_CHECK_VERSION(0, 64, 0)
+ void PDFOutDev::drawString(GfxState*, const GooString* /*s*/)
+ #else
+ void PDFOutDev::drawString(GfxState*, GooString* /*s*/)
diff --git a/graphics/gdal/files/patch-frmts_pdf_pdfdataset.cpp b/graphics/gdal/files/patch-frmts_pdf_pdfdataset.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/gdal/files/patch-frmts_pdf_pdfdataset.cpp
@@ -0,0 +1,130 @@
+--- frmts/pdf/pdfdataset.cpp.orig 2026-02-09 17:36:29 UTC
++++ frmts/pdf/pdfdataset.cpp
+@@ -38,6 +38,7 @@
+ #include "pdfdrivercore.h"
+
+ #include <algorithm>
++#include <array>
+ #include <cassert>
+ #include <limits>
+ #include <set>
+@@ -93,8 +94,13 @@ class GDALPDFOutputDev final : public SplashOutputDev
+
+ public:
+ GDALPDFOutputDev(SplashColorMode colorModeA, int bitmapRowPadA,
+- bool reverseVideoA, SplashColorPtr paperColorA)
+- : SplashOutputDev(colorModeA, bitmapRowPadA, reverseVideoA,
++ [[maybe_unused]] bool reverseVideoA,
++ SplashColorPtr paperColorA)
++ : SplashOutputDev(colorModeA, bitmapRowPadA,
++#if POPPLER_MAJOR_VERSION < 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION < 2)
++ reverseVideoA,
++#endif
+ paperColorA),
+ bEnableVector(TRUE), bEnableText(TRUE), bEnableBitmap(TRUE)
+ {
+@@ -175,10 +181,17 @@ class GDALPDFOutputDev final : public SplashOutputDev
+ }
+ }
+
+- virtual void setSoftMaskFromImageMask(GfxState *state, Object *ref,
+- Stream *str, int width, int height,
+- bool invert, bool inlineImg,
+- double *baseMatrix) override
++#if POPPLER_MAJOR_VERSION > 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION >= 2)
++ void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
++ int width, int height, bool invert,
++ bool inlineImg,
++ std::array<double, 6> &baseMatrix) override
++#else
++ void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
++ int width, int height, bool invert,
++ bool inlineImg, double *baseMatrix) override
++#endif
+ {
+ if (bEnableBitmap)
+ SplashOutputDev::setSoftMaskFromImageMask(
+@@ -187,8 +200,14 @@ class GDALPDFOutputDev final : public SplashOutputDev
+ str->close();
+ }
+
+- virtual void unsetSoftMaskFromImageMask(GfxState *state,
+- double *baseMatrix) override
++#if POPPLER_MAJOR_VERSION > 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION >= 2)
++ void unsetSoftMaskFromImageMask(GfxState *state,
++ std::array<double, 6> &baseMatrix) override
++#else
++ void unsetSoftMaskFromImageMask(GfxState *state,
++ double *baseMatrix) override
++#endif
+ {
+ if (bEnableBitmap)
+ SplashOutputDev::unsetSoftMaskFromImageMask(state, baseMatrix);
+@@ -2458,6 +2477,8 @@ static void PDFFreeDoc(PDFDoc *poDoc)
+ {
+ if (poDoc)
+ {
++#if POPPLER_MAJOR_VERSION < 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION < 2)
+ /* hack to avoid potential cross heap issues on Win32 */
+ /* str is the VSIPDFFileStream object passed in the constructor of
+ * PDFDoc */
+@@ -2465,6 +2486,7 @@ static void PDFFreeDoc(PDFDoc *poDoc)
+ // VSIPDFFileStream::FillBuffer() */
+ delete poDoc->str;
+ poDoc->str = nullptr;
++#endif
+
+ delete poDoc;
+ }
+@@ -4635,8 +4657,9 @@ PDFDataset *PDFDataset::Open(GDALOpenInfo *poOpenInfo)
+ if (globalParamsCreatedByGDAL)
+ registerErrorCallback();
+ Object oObj;
+- auto poStream =
+- new VSIPDFFileStream(fp.get(), pszFilename, std::move(oObj));
++ auto poStream = std::make_unique<VSIPDFFileStream>(
++ fp.get(), pszFilename, std::move(oObj));
++ const bool bFoundLinearizedHint = poStream->FoundLinearizedHint();
+ #if POPPLER_MAJOR_VERSION > 22 || \
+ (POPPLER_MAJOR_VERSION == 22 && POPPLER_MINOR_VERSION > 2)
+ std::optional<GooString> osUserPwd;
+@@ -4644,8 +4667,14 @@ PDFDataset *PDFDataset::Open(GDALOpenInfo *poOpenInfo)
+ osUserPwd = std::optional<GooString>(pszUserPwd);
+ try
+ {
+- poDocPoppler =
+- new PDFDoc(poStream, std::optional<GooString>(), osUserPwd);
++#if POPPLER_MAJOR_VERSION > 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION >= 2)
++ poDocPoppler = new PDFDoc(
++ std::move(poStream), std::optional<GooString>(), osUserPwd);
++#else
++ poDocPoppler = new PDFDoc(
++ poStream.release(), std::optional<GooString>(), osUserPwd);
++#endif
+ }
+ catch (const std::exception &e)
+ {
+@@ -4657,7 +4686,7 @@ PDFDataset *PDFDataset::Open(GDALOpenInfo *poOpenInfo)
+ GooString *poUserPwd = nullptr;
+ if (pszUserPwd)
+ poUserPwd = new GooString(pszUserPwd);
+- poDocPoppler = new PDFDoc(poStream, nullptr, poUserPwd);
++ poDocPoppler = new PDFDoc(poStream.release(), nullptr, poUserPwd);
+ delete poUserPwd;
+ #endif
+ if (globalParamsCreatedByGDAL)
+@@ -4707,8 +4736,7 @@ PDFDataset *PDFDataset::Open(GDALOpenInfo *poOpenInfo)
+ PDFFreeDoc(poDocPoppler);
+ return nullptr;
+ }
+- else if (poDocPoppler->isLinearized() &&
+- !poStream->FoundLinearizedHint())
++ else if (poDocPoppler->isLinearized() && !bFoundLinearizedHint)
+ {
+ // This is a likely defect of poppler Linearization.cc file that
+ // recognizes a file as linearized if the /Linearized hint is
diff --git a/graphics/gdal/files/patch-frmts_pdf_pdfio.h b/graphics/gdal/files/patch-frmts_pdf_pdfio.h
new file mode 100644
--- /dev/null
+++ b/graphics/gdal/files/patch-frmts_pdf_pdfio.h
@@ -0,0 +1,15 @@
+--- frmts/pdf/pdfio.h.orig 2026-02-09 17:36:29 UTC
++++ frmts/pdf/pdfio.h
+@@ -29,7 +29,12 @@ class VSIPDFFileStream final : public BaseStream
+ bool limitedA, vsi_l_offset lengthA, Object &&dictA);
+ ~VSIPDFFileStream() override;
+
++#if POPPLER_MAJOR_VERSION > 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION >= 2)
++ std::unique_ptr<BaseStream> copy() override;
++#else
+ BaseStream *copy() override;
++#endif
+
+ #if POPPLER_MAJOR_VERSION > 25 || \
+ (POPPLER_MAJOR_VERSION == 25 && POPPLER_MINOR_VERSION >= 5)
diff --git a/graphics/gdal/files/patch-frmts_pdf_pdfio.cpp b/graphics/gdal/files/patch-frmts_pdf_pdfio.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/gdal/files/patch-frmts_pdf_pdfio.cpp
@@ -0,0 +1,23 @@
+--- frmts/pdf/pdfio.cpp.orig 2026-02-09 17:36:29 UTC
++++ frmts/pdf/pdfio.cpp
+@@ -68,11 +68,20 @@ VSIPDFFileStream::~VSIPDFFileStream()
+ /* copy() */
+ /************************************************************************/
+
++#if POPPLER_MAJOR_VERSION > 26 || \
++ (POPPLER_MAJOR_VERSION == 26 && POPPLER_MINOR_VERSION >= 2)
++std::unique_ptr<BaseStream> VSIPDFFileStream::copy()
++{
++ return std::make_unique<VSIPDFFileStream>(poParent, nStart, bLimited,
++ nLength, dict.copy());
++}
++#else
+ BaseStream *VSIPDFFileStream::copy()
+ {
+ return new VSIPDFFileStream(poParent, nStart, bLimited, nLength,
+ dict.copy());
+ }
++#endif
+
+ /************************************************************************/
+ /* makeSubStream() */
diff --git a/graphics/gdal/files/patch-frmts_pdf_pdfobject.cpp b/graphics/gdal/files/patch-frmts_pdf_pdfobject.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/gdal/files/patch-frmts_pdf_pdfobject.cpp
@@ -0,0 +1,29 @@
+--- frmts/pdf/pdfobject.cpp.orig 2026-02-09 17:36:29 UTC
++++ frmts/pdf/pdfobject.cpp
+@@ -1122,8 +1122,24 @@ const std::string &GDALPDFObjectPoppler::GetString()
+ {
+ if (GetType() == PDFObjectType_String)
+ {
+- const GooString *gooString = m_poConst->getString();
+- const std::string &osStdStr = gooString->toStr();
++ const std::string &osStdStr = *(
++ [](auto &&obj) -> const std::string *
++ {
++ if constexpr (std::is_same_v<decltype(obj),
++ const std::string &>)
++ {
++ // Since Poppler 26.04
++ return &obj;
++ }
++ else
++ {
++ static_assert(
++ std::is_same_v<decltype(obj), const GooString *&&>);
++ static_assert(std::is_same_v<decltype(obj->toStr()),
++ const std::string &>);
++ return &(obj->toStr());
++ }
++ }(m_poConst->getString()));
+ const bool bLEUnicodeMarker =
+ osStdStr.size() >= 2 && static_cast<uint8_t>(osStdStr[0]) == 0xFE &&
+ static_cast<uint8_t>(osStdStr[1]) == 0xFF;
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-input.cpp b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-input.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-input.cpp
@@ -0,0 +1,10 @@
+--- src/extension/internal/pdfinput/pdf-input.cpp.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/pdf-input.cpp
+@@ -33,6 +33,7 @@
+ #include <poppler/glib/poppler.h>
+ #include <poppler/glib/poppler-document.h>
+ #include <poppler/glib/poppler-page.h>
++#include <poppler/goo/gmem.h>
+ #endif
+
+ #include <gdkmm/general.h>
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.h b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.h
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.h
@@ -0,0 +1,16 @@
+--- src/extension/internal/pdfinput/pdf-parser.h.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/pdf-parser.h
+@@ -283,10 +283,11 @@ class PdfParser { (private)
+ void opMoveShowText(Object args[], int numArgs);
+ void opMoveSetShowText(Object args[], int numArgs);
+ void opShowSpaceText(Object args[], int numArgs);
++ void doShowText(const std::string &s);
+ #if POPPLER_CHECK_VERSION(0,64,0)
+- void doShowText(const GooString *s);
++ void doShowText(const GooString *s);
+ #else
+- void doShowText(GooString *s);
++ void doShowText(GooString *s);
+ #endif
+
+
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.cpp b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_pdf-parser.cpp
@@ -0,0 +1,170 @@
+--- src/extension/internal/pdfinput/pdf-parser.cpp.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -653,7 +653,11 @@ void PdfParser::opSetLineJoin(Object args[], int /*num
+ void PdfParser::opSetLineJoin(Object args[], int /*numArgs*/)
+ {
+ builder->beforeStateChange(state);
++#if POPPLER_CHECK_VERSION(26,2,0)
++ state->setLineJoin((GfxState::LineJoinStyle) args[0].getInt());
++#else
+ state->setLineJoin(args[0].getInt());
++#endif
+ builder->updateStyle(state);
+ }
+
+@@ -661,7 +665,11 @@ void PdfParser::opSetLineCap(Object args[], int /*numA
+ void PdfParser::opSetLineCap(Object args[], int /*numArgs*/)
+ {
+ builder->beforeStateChange(state);
++#if POPPLER_CHECK_VERSION(26,2,0)
++ state->setLineCap((GfxState::LineCapStyle) args[0].getInt());
++#else
+ state->setLineCap(args[0].getInt());
++#endif
+ builder->updateStyle(state);
+ }
+
+@@ -1565,7 +1573,13 @@ void PdfParser::doShadingPatternFillFallback(GfxShadin
+
+ // restore graphics state
+ restoreState();
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++ state->clearPath();
++ GfxPath *currPath = const_cast<GfxPath*>(state->getPath());
++ currPath->append(savedPath);
++#else
+ state->setPath(savedPath);
++#endif
+ }
+
+ // TODO not good that numArgs is ignored but args[] is used:
+@@ -1626,7 +1640,13 @@ void PdfParser::opShFill(Object args[], int /*numArgs*
+ // restore graphics state
+ if (savedState) {
+ restoreState();
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++ state->clearPath();
++ GfxPath *currPath = const_cast<GfxPath*>(state->getPath());
++ currPath->append(savedPath);
++#else
+ state->setPath(savedPath);
++#endif
+ }
+ }
+
+@@ -2213,7 +2233,7 @@ void PdfParser::opShowSpaceText(Object args[], int /*n
+ {
+ Array *a = nullptr;
+ Object obj;
+- int wMode = 0; // Writing mode (horizontal/vertical).
++ _POPPLER_WMODE wMode = _POPPLER_WMODE_HORIZONTAL; // Writing mode (horizontal/vertical).
+
+ if (!state->getFont()) {
+ error(errSyntaxError, getPos(), "No font in show/space");
+@@ -2227,7 +2247,7 @@ void PdfParser::opShowSpaceText(Object args[], int /*n
+ if (obj.isNum()) {
+ // this uses the absolute value of the font size to match
+ // Acrobat's behavior
+- if (wMode) {
++ if (wMode != _POPPLER_WMODE_HORIZONTAL) {
+ state->textShift(0, -obj.getNum() * 0.001 *
+ fabs(state->getFontSize()));
+ } else {
+@@ -2248,15 +2268,11 @@ void PdfParser::opShowSpaceText(Object args[], int /*n
+ * This adds a string from a PDF file that is contained in one command ('Tj', ''', '"')
+ * or is one string in ShowSpacetext ('TJ').
+ */
+-#if POPPLER_CHECK_VERSION(0,64,0)
+-void PdfParser::doShowText(const GooString *s) {
+-#else
+-void PdfParser::doShowText(GooString *s) {
+-#endif
++void PdfParser::doShowText(const std::string &s) {
+ auto font = state->getFont();
+- int wMode = font->getWMode(); // Vertical/Horizontal/Invalid
++ _POPPLER_WMODE wMode = font->getWMode(); // Vertical/Horizontal/Invalid
+
+- builder->beginString(state, get_goostring_length(*s));
++ builder->beginString(state, s.size());
+
+ // handle a Type 3 char
+ if (font->getType() == fontType3) {
+@@ -2266,8 +2282,8 @@ void PdfParser::doShowText(GooString *s) {
+ double riseX, riseY;
+ state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
+
+- auto p = s->getCString(); // char* or const char*
+- int len = get_goostring_length(*s);
++ auto p = s.c_str(); // char* or const char*
++ int len = s.size();
+
+ while (len > 0) {
+
+@@ -2289,7 +2305,7 @@ void PdfParser::doShowText(GooString *s) {
+ auto ax = dx;
+ auto ay = dy;
+
+- if (wMode != 0) {
++ if (wMode != _POPPLER_WMODE_HORIZONTAL) {
+ // Vertical text (or invalid value).
+ dy += state->getCharSpace();
+ if (n == 1 && *p == ' ') {
+@@ -2324,7 +2340,16 @@ void PdfParser::doShowText(GooString *s) {
+ builder->endString(state);
+ }
+
++#if POPPLER_CHECK_VERSION(0,64,0)
++void PdfParser::doShowText(const GooString *s) {
++#else
++void PdfParser::doShowText(GooString *s) {
++#endif
++ const std::string str = s->toStr();
++ doShowText(str);
++}
+
++
+ //------------------------------------------------------------------------
+ // XObject operators
+ //------------------------------------------------------------------------
+@@ -2931,7 +2956,11 @@ Stream *PdfParser::buildImageStream() {
+
+ // build dictionary
+ #if defined(POPPLER_NEW_OBJECT_API)
++#if POPPLER_CHECK_VERSION(26, 3, 0)
++ dict = Object(std::make_unique<Dict>(xref));
++#else
+ dict = Object(new Dict(xref));
++#endif
+ #else
+ dict.initDict(xref);
+ #endif
+@@ -2964,7 +2993,11 @@ Stream *PdfParser::buildImageStream() {
+ // make stream
+ #if defined(POPPLER_NEW_OBJECT_API)
+ str = new EmbedStream(parser->getStream(), dict.copy(), gFalse, 0);
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++ str = str->addFilters(std::unique_ptr<Stream>(str), dict.getDict()).release();
++#else
+ str = str->addFilters(dict.getDict());
++#endif
+ #else
+ str = new EmbedStream(parser->getStream(), &dict, gFalse, 0);
+ str = str->addFilters(&dict);
+@@ -3137,10 +3170,17 @@ void PdfParser::loadOptionalContentLayers(Dict *resour
+ auto visible = true;
+ // Normally we'd use poppler optContentIsVisible, but these dict
+ // objects don't retain their references so can't be used directly.
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++ for (auto &[ref, ocg] : ocgs->getOCGs()) {
++ if (ocg->getName()->toStr() == label)
++ visible = ocg->getState() == OptionalContentGroup::On;
++ }
++#else
+ for (auto &[ref, ocg] : ocgs->getOCGs()) {
+ if (ocg->getName()->cmp(label) == 0)
+ visible = ocg->getState() == OptionalContentGroup::On;
+ }
++#endif
+ builder->addOptionalGroup(dict->getKey(j), label, visible);
+ }
+ }
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-transition-api.h b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-transition-api.h
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-transition-api.h
@@ -0,0 +1,35 @@
+--- src/extension/internal/pdfinput/poppler-transition-api.h.orig 2025-07-25 10:14:52 UTC
++++ src/extension/internal/pdfinput/poppler-transition-api.h
+@@ -15,6 +15,16 @@
+ #include <glib/poppler-features.h>
+ #include <poppler/UTF.h>
+
++#if POPPLER_CHECK_VERSION(26, 2, 0)
++#define _POPPLER_WMODE GfxFont::WritingMode
++#define _POPPLER_WMODE_HORIZONTAL GfxFont::WritingMode::Horizontal
++#define _POPPLER_WMODE_VERTICAL GfxFont::WritingMode::Vertical
++#else
++#define _POPPLER_WMODE int
++#define _POPPLER_WMODE_HORIZONTAL 0
++#define _POPPLER_WMODE_VERTICAL 1
++#endif
++
+ #if POPPLER_CHECK_VERSION(25, 7, 0)
+ #define _POPPLER_TEXT_SHIFT_WITH_USER_COORDS(dx, dy) textShiftWithUserCoords(dx, dy)
+ #define _POPPLER_FOFI_TRUETYPE_MAKE(font_data, faceIndex) FoFiTrueType::make(std::span(font_data), faceIndex)
+@@ -62,11 +72,11 @@
+ #endif
+
+ #if POPPLER_CHECK_VERSION(24, 5, 0)
+-#define _POPPLER_HAS_UNICODE_BOM(value) (hasUnicodeByteOrderMark(value->toStr()))
+-#define _POPPLER_HAS_UNICODE_BOMLE(value) (hasUnicodeByteOrderMarkLE(value->toStr()))
++#define _POPPLER_HAS_UNICODE_BOM(value) (hasUnicodeByteOrderMark(value))
++#define _POPPLER_HAS_UNICODE_BOMLE(value) (hasUnicodeByteOrderMarkLE(value))
+ #else
+-#define _POPPLER_HAS_UNICODE_BOM(value) (value->hasUnicodeMarker())
+-#define _POPPLER_HAS_UNICODE_BOMLE(value) (value->hasUnicodeMarkerLE())
++#define _POPPLER_HAS_UNICODE_BOM(value) (GooString(value).hasUnicodeMarker())
++#define _POPPLER_HAS_UNICODE_BOMLE(value) (GooString(value).hasUnicodeMarkerLE())
+ #endif
+
+ #if POPPLER_CHECK_VERSION(24, 3, 0)
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.h b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.h
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.h
@@ -0,0 +1,10 @@
+--- src/extension/internal/pdfinput/poppler-utils.h.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/poppler-utils.h
+@@ -83,6 +83,7 @@ std::string getDictString(Dict *dict, const char *key)
+ FontList getPdfFonts(std::shared_ptr<PDFDoc> pdf_doc);
+ std::string getNameWithoutSubsetTag(std::string name);
+ std::string getDictString(Dict *dict, const char *key);
++std::string getString(const std::string &value);
+ std::string getString(const GooString *value);
+ std::string validateString(std::string const &in);
+
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.cpp b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_poppler-utils.cpp
@@ -0,0 +1,121 @@
+--- src/extension/internal/pdfinput/poppler-utils.cpp.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/poppler-utils.cpp
+@@ -16,6 +16,7 @@
+ #include <poppler/GfxFont.h>
+ #include <poppler/GfxState.h>
+ #include <poppler/PDFDoc.h>
++#include <poppler/PDFDocEncoding.h>
+ #include <poppler/UTF.h>
+
+ #include "libnrtype/font-factory.h"
+@@ -88,7 +89,11 @@ InkFontDict::InkFontDict(XRef *xref, Ref *fontDictRef,
+ r.num = hashFontObject(&obj2);
+ }
+ // Newer poppler will require some reworking as it gives a shared ptr.
++#if POPPLER_CHECK_VERSION(26,3,0)
++ fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i), r, *obj2.getDict());
++#else
+ fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i), r, obj2.getDict());
++#endif
+ if (fonts[i] && !fonts[i]->isOk()) {
+ fonts[i] = nullptr;
+ }
+@@ -145,7 +150,6 @@ void InkFontDict::hashFontObject1(const Object *obj, F
+
+ void InkFontDict::hashFontObject1(const Object *obj, FNVHash *h)
+ {
+- const GooString *s;
+ const char *p;
+ double r;
+ int n, i;
+@@ -165,11 +169,16 @@ void InkFontDict::hashFontObject1(const Object *obj, F
+ r = obj->getReal();
+ h->hash((char *)&r, sizeof(double));
+ break;
+- case objString:
++ case objString: {
+ h->hash('s');
+- s = obj->getString();
++#if POPPLER_CHECK_VERSION(26, 4, 0)
++ const auto &s = obj->getString();
++ h->hash(s.c_str(), s.size());
++#else
++ const GooString* s = obj->getString();
+ h->hash(s->c_str(), get_goostring_length(*s));
+- break;
++#endif
++ } break;
+ case objName:
+ h->hash('n');
+ p = obj->getName();
+@@ -586,20 +595,52 @@ std::string getDictString(Dict *dict, const char *key)
+ return getString(obj.getString());
+ }
+
++std::string getString(const std::unique_ptr<GooString> &value)
++{
++ return getString(value.get());
++}
++
++std::string getString(const GooString *value)
++{
++ if (value) {
++ return getString(value->toStr());
++ }
++ return "";
++}
++
+ /**
+ * Convert PDF strings, which can be formatted as UTF8, UTF16BE or UTF16LE into
+ * a predictable UTF8 string consistant with svg requirements.
+ */
+-std::string getString(const GooString *value)
++std::string getString(const std::string &value)
+ {
++ char *str = nullptr;
++ int stringLength;
++
+ if (_POPPLER_HAS_UNICODE_BOM(value)) {
+- return g_convert(value->getCString () + 2, get_goostring_length(*value) - 2,
+- "UTF-8", "UTF-16BE", NULL, NULL, NULL);
++ str = g_convert(value.c_str() + 2, value.size() - 2,
++ "UTF-8", "UTF-16BE", NULL, NULL, NULL);
+ } else if (_POPPLER_HAS_UNICODE_BOMLE(value)) {
+- return g_convert(value->getCString () + 2, get_goostring_length(*value) - 2,
+- "UTF-8", "UTF-16LE", NULL, NULL, NULL);
++ str = g_convert(value.c_str() + 2, value.size() - 2,
++ "UTF-8", "UTF-16LE", NULL, NULL, NULL);
+ }
+- return value->toStr();
++#if POPPLER_CHECK_VERSION(25,02,0)
++ else if (auto utf16 = pdfDocEncodingToUTF16(value); !utf16.empty()) {
++ str = g_convert(utf16.c_str(), utf16.length(), "UTF-8", "UTF-16", NULL, NULL, NULL);
++ }
++#else
++ else if (auto utf16 = pdfDocEncodingToUTF16(value, &stringLength)) {
++ str = g_convert(utf16, stringLength, "UTF-8", "UTF-16", NULL, NULL, NULL);
++ delete[] utf16;
++ }
++#endif
++ if (str) {
++ std::string copy = str;
++ g_free(str);
++ return copy;
++ }
++ g_warning("Couldn't parse text in PDF from UTF16.");
++ return "";
+ }
+
+ void pdf_debug_array(const Array *array, int depth, XRef *xref)
+@@ -656,7 +697,11 @@ void pdf_debug_object(const Object *obj, int depth, XR
+ } else if (obj->isArray()) {
+ pdf_debug_array(obj->getArray(), depth, xref);
+ } else if (obj->isString()) {
++#if POPPLER_CHECK_VERSION(26, 4, 0)
++ std::cout << " STR '" << obj->getString().c_str() << "'";
++#else
+ std::cout << " STR '" << obj->getString()->getCString() << "'";
++#endif
+ } else if (obj->isName()) {
+ std::cout << " NAME '" << obj->getName() << "'";
+ } else if (obj->isBool()) {
diff --git a/graphics/inkscape/files/patch-src_extension_internal_pdfinput_svg-builder.cpp b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_svg-builder.cpp
new file mode 100644
--- /dev/null
+++ b/graphics/inkscape/files/patch-src_extension_internal_pdfinput_svg-builder.cpp
@@ -0,0 +1,72 @@
+--- src/extension/internal/pdfinput/svg-builder.cpp.orig 2025-12-26 00:35:50 UTC
++++ src/extension/internal/pdfinput/svg-builder.cpp
+@@ -32,6 +32,7 @@
+ #include <poppler/GfxState.h>
+ #include <poppler/Page.h>
+ #include <poppler/Stream.h>
++#include <poppler/goo/gmem.h>
+
+ #include "color.h"
+ #include "color/cms-util.h"
+@@ -1385,7 +1386,7 @@ void SvgBuilder::updateFont(GfxState *state, std::shar
+ sp_repr_css_set_property(_css_font, "font-variant", "normal");
+
+ // Writing mode
+- if ( font->getWMode() == 0 ) {
++ if ( font->getWMode() == _POPPLER_WMODE_HORIZONTAL ) {
+ sp_repr_css_set_property(_css_font, "writing-mode", "lr");
+ } else {
+ sp_repr_css_set_property(_css_font, "writing-mode", "tb");
+@@ -1397,7 +1398,7 @@ void SvgBuilder::updateTextShift(GfxState *state, doub
+ */
+ void SvgBuilder::updateTextShift(GfxState *state, double shift) {
+ double shift_value = -shift * 0.001 * fabs(state->getFontSize());
+- if (state->getFont()->getWMode()) {
++ if (state->getFont()->getWMode() != _POPPLER_WMODE_HORIZONTAL) {
+ _text_position[1] += shift_value;
+ } else {
+ _text_position[0] += shift_value;
+@@ -1451,7 +1452,7 @@ Inkscape::XML::Node* SvgBuilder::_flushTextText(GfxSta
+
+ // Text direction is a property of the <text> element.
+ auto font = state->getFont();
+- if (font->getWMode() == 1) {
++ if (font->getWMode() == _POPPLER_WMODE_VERTICAL) {
+ // Only set if vertical.
+ auto css_text = sp_repr_css_attr_new();
+ sp_repr_css_set_property(css_text, "writing-mode", "tb");
+@@ -1545,8 +1546,8 @@ Inkscape::XML::Node* SvgBuilder::_flushTextText(GfxSta
+ bool output_tspan =
+ next_it == _glyphs.end() ||
+ next_it->style_changed ||
+- (writing_mode == 0 && std::abs(glyph.text_position[1] - next_it->text_position[1]) > 0.1) ||
+- (writing_mode == 1 && std::abs(glyph.text_position[0] - next_it->text_position[0]) > 0.1);
++ (writing_mode == _POPPLER_WMODE_HORIZONTAL && std::abs(glyph.text_position[1] - next_it->text_position[1]) > 0.1) ||
++ (writing_mode == _POPPLER_WMODE_VERTICAL && std::abs(glyph.text_position[0] - next_it->text_position[0]) > 0.1);
+
+ if (output_tspan) {
+
+@@ -2093,7 +2094,11 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *
+ } else {
+ image_stream = new ImageStream(str, width, 1, 1);
+ }
++#if POPPLER_CHECK_VERSION(26, 0, 0)
++ image_stream->rewind();
++#else
+ image_stream->reset();
++#endif
+
+ // Convert grayscale values
+ unsigned char *buffer = new unsigned char[width];
+@@ -2119,7 +2124,11 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *
+ image_stream = new ImageStream(str, width,
+ color_map->getNumPixelComps(),
+ color_map->getBits());
++#if POPPLER_CHECK_VERSION(26, 0, 0)
++ image_stream->rewind();
++#else
+ image_stream->reset();
++#endif
+
+ // Convert RGB values
+ unsigned int *buffer = new unsigned int[width];
diff --git a/graphics/poppler-qt5/Makefile b/graphics/poppler-qt5/Makefile
--- a/graphics/poppler-qt5/Makefile
+++ b/graphics/poppler-qt5/Makefile
@@ -1,8 +1,13 @@
COMMENT= Qt 5 bindings to poppler
+# needed for tests
+USE_LOCALE= en_US.UTF-8
+
MASTERDIR= ${.CURDIR}/../../graphics/poppler
_SLAVE_PORT= qt5
PLIST= ${.CURDIR}/pkg-plist
+OPTIONS_DEFINE= TEST
+
.include "${MASTERDIR}/Makefile"
diff --git a/graphics/poppler-qt5/pkg-plist b/graphics/poppler-qt5/pkg-plist
--- a/graphics/poppler-qt5/pkg-plist
+++ b/graphics/poppler-qt5/pkg-plist
@@ -9,5 +9,5 @@
include/poppler/qt5/poppler-version.h
lib/libpoppler-qt5.so
lib/libpoppler-qt5.so.1
-lib/libpoppler-qt5.so.1.39.0
+lib/libpoppler-qt5.so.1.40.0
libdata/pkgconfig/poppler-qt5.pc
diff --git a/graphics/poppler-qt6/Makefile b/graphics/poppler-qt6/Makefile
--- a/graphics/poppler-qt6/Makefile
+++ b/graphics/poppler-qt6/Makefile
@@ -5,4 +5,6 @@
_SLAVE_PORT= qt6
PLIST= ${.CURDIR}/pkg-plist
+OPTIONS_DEFINE= TEST
+
.include "${MASTERDIR}/Makefile"
diff --git a/graphics/poppler-qt6/pkg-plist b/graphics/poppler-qt6/pkg-plist
--- a/graphics/poppler-qt6/pkg-plist
+++ b/graphics/poppler-qt6/pkg-plist
@@ -10,5 +10,5 @@
include/poppler/qt6/poppler-version.h
lib/libpoppler-qt6.so
lib/libpoppler-qt6.so.3
-lib/libpoppler-qt6.so.3.11.0
+lib/libpoppler-qt6.so.3.12.0
libdata/pkgconfig/poppler-qt6.pc
diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile
--- a/graphics/poppler/Makefile
+++ b/graphics/poppler/Makefile
@@ -1,8 +1,8 @@
PORTNAME= poppler
-DISTVERSION= 25.10.0
-PORTREVISION= 1
+DISTVERSION= 26.04.0
CATEGORIES= graphics print
MASTER_SITES= https://poppler.freedesktop.org/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER?= desktop@FreeBSD.org
COMMENT?= PDF rendering library
@@ -23,7 +23,7 @@
gsed:textproc/gsed
RUN_DEPENDS= poppler-data>0:graphics/poppler-data
-USES= cmake:insource compiler:c++20-lang cpe gperf jpeg \
+USES= cmake:testing compiler:c++20-lang cpe gperf jpeg \
localbase pathfix pkgconfig tar:xz
CPE_VENDOR= freedesktop
USE_LDCONFIG= yes
@@ -40,7 +40,10 @@
# Note: since f3ba77e14cac05d43caf35100848eeaee3bc64b4 graphics/openjpeg15 installs
# its cmake files to ${PREFIX}/lib/openjpeg15
CMAKE_ARGS+= -DCMAKE_IGNORE_PATH:PATH=${PREFIX}/lib/openjpeg-1.5 \
- -DENABLE_DCTDECODER:STRING="libjpeg"
+ -DENABLE_DCTDECODER:STRING="libjpeg" \
+ -DTESTDATADIR:PATH=${WRKSRC}/testdata
+
+USE_GITLAB= nodefault
# Slave ports.
_POPPLER_SLAVES= library glib qt5 qt6 utils
@@ -57,9 +60,9 @@
PORTSCOUT= limitw:1,even
USES+= iconv
CMAKE_ON+= ENABLE_CPP
-PLIST_SUB+= SHLIB_VER=154
+PLIST_SUB+= SHLIB_VER=159
-OPTIONS_DEFINE= CURL OPENJPEG GNUPG
+OPTIONS_DEFINE= CURL OPENJPEG GNUPG TEST
OPTIONS_DEFAULT= OPENJPEG GNUPG
OPTIONS_SUB= yes
.else
@@ -68,8 +71,8 @@
LIB_DEPENDS+= libpoppler.so:graphics/poppler
PKGNAMESUFFIX= -${_SLAVE_PORT}
-BUILD_WRKSRC= ${WRKSRC}/${_SLAVE_PORT}
-INSTALL_WRKSRC= ${WRKSRC}/${_SLAVE_PORT}
+BUILD_WRKSRC= ${CONFIGURE_WRKSRC}/${_SLAVE_PORT}
+INSTALL_WRKSRC= ${CONFIGURE_WRKSRC}/${_SLAVE_PORT}
CMAKE_ARGS+= -DENABLE_LIBOPENJPEG:STRING="none" \
-DENABLE_LIBCURL:BOOL=FALSE \
@@ -105,15 +108,17 @@
GNUPG_LIB_DEPENDS= libgpgme.so:security/gpgme \
libgpgmepp.so:security/gpgmepp
+TEST_GL_TUPLE= https://gitlab.freedesktop.org:poppler:test:b85e4d1ce75636b3e727555a9d31da34ad771c1c:testdata/testdata
+
post-install:
.if ${_SLAVE_PORT} == glib
- ${INSTALL_DATA} ${WRKSRC}/poppler-glib.pc \
+ ${INSTALL_DATA} ${BUILD_WRKSRC}/../poppler-glib.pc \
${STAGEDIR}${PREFIX}/libdata/pkgconfig
.elif ${_SLAVE_PORT} == qt5
- ${INSTALL_DATA} ${WRKSRC}/poppler-qt5.pc \
+ ${INSTALL_DATA} ${BUILD_WRKSRC}/../poppler-qt5.pc \
${STAGEDIR}${PREFIX}/libdata/pkgconfig
.elif ${_SLAVE_PORT} == qt6
- ${INSTALL_DATA} ${WRKSRC}/poppler-qt6.pc \
+ ${INSTALL_DATA} ${BUILD_WRKSRC}/../poppler-qt6.pc \
${STAGEDIR}${PREFIX}/libdata/pkgconfig
.endif
diff --git a/graphics/poppler/distinfo b/graphics/poppler/distinfo
--- a/graphics/poppler/distinfo
+++ b/graphics/poppler/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1764268443
-SHA256 (poppler-25.10.0.tar.xz) = 6b5e9bb64dabb15787a14db1675291c7afaf9387438cc93a4fb7f6aec4ee6fe0
-SIZE (poppler-25.10.0.tar.xz) = 1985796
+TIMESTAMP = 1776172947
+SHA256 (poppler-26.04.0.tar.xz) = b0955163114af96bc0106f68cb24daf973a629462453d8b82775f81b0d4e0693
+SIZE (poppler-26.04.0.tar.xz) = 2032180
+SHA256 (poppler-test-b85e4d1ce75636b3e727555a9d31da34ad771c1c_GL0.tar.gz) = 2b662350a1680343a14737e4824aa98b6048a808b7972959f1da641cd5f182c7
+SIZE (poppler-test-b85e4d1ce75636b3e727555a9d31da34ad771c1c_GL0.tar.gz) = 5928271
diff --git a/graphics/poppler/pkg-plist b/graphics/poppler/pkg-plist
--- a/graphics/poppler/pkg-plist
+++ b/graphics/poppler/pkg-plist
@@ -40,6 +40,7 @@
include/poppler/PDFDocBuilder.h
include/poppler/PDFDocEncoding.h
include/poppler/PDFDocFactory.h
+include/poppler/PDFRectangle.h
include/poppler/PSOutputDev.h
include/poppler/Page.h
include/poppler/PageTransition.h
@@ -112,8 +113,8 @@
include/poppler/splash/SplashPattern.h
include/poppler/splash/SplashTypes.h
lib/libpoppler-cpp.so
-lib/libpoppler-cpp.so.2
-lib/libpoppler-cpp.so.2.2.0
+lib/libpoppler-cpp.so.3
+lib/libpoppler-cpp.so.3.0.0
lib/libpoppler.so
lib/libpoppler.so.%%SHLIB_VER%%
lib/libpoppler.so.%%SHLIB_VER%%.0.0
diff --git a/print/scribus/files/patch-scribus_plugins_import_pdf_importpdf.cpp b/print/scribus/files/patch-scribus_plugins_import_pdf_importpdf.cpp
new file mode 100644
--- /dev/null
+++ b/print/scribus/files/patch-scribus_plugins_import_pdf_importpdf.cpp
@@ -0,0 +1,66 @@
+--- scribus/plugins/import/pdf/importpdf.cpp.orig 2025-12-14 22:43:57 UTC
++++ scribus/plugins/import/pdf/importpdf.cpp
+@@ -100,7 +100,11 @@ QImage PdfPlug::readThumbnail(const QString& fName)
+ bgColor[0] = 255;
+ bgColor[1] = 255;
+ bgColor[2] = 255;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ SplashOutputDev dev(splashModeXBGR8, 4, bgColor, true);
++#else
+ SplashOutputDev dev(splashModeXBGR8, 4, false, bgColor, true);
++#endif
+ dev.setVectorAntialias(true);
+ dev.setFreeTypeHinting(true, false);
+ dev.startDoc(&pdfDoc);
+@@ -175,20 +179,17 @@ bool PdfPlug::importFile(const QString& fNameIn, const
+ }
+ double docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+ double docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
+- if (!m_interactive || (flags & LoadSavePlugin::lfInsertPage))
++ if (m_Doc && (!m_interactive || (flags & LoadSavePlugin::lfInsertPage)))
+ {
+ m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
+ m_Doc->addPage(0);
+ m_Doc->view()->addPage(0, true);
+ }
+- else
++ else if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
+ {
+- if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
+- {
+- m_Doc = ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, 1, "Custom", true);
+- ScCore->primaryMainWindow()->HaveNewDoc();
+- ret = true;
+- }
++ m_Doc = ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, 1, "Custom", true);
++ ScCore->primaryMainWindow()->HaveNewDoc();
++ ret = true;
+ }
+
+ if (ret || !m_interactive)
+@@ -846,11 +847,15 @@ QImage PdfPlug::readPreview(int pgNum, int width, int
+ bgColor[0] = 255;
+ bgColor[1] = 255;
+ bgColor[2] = 255;
+- SplashOutputDev *dev = new SplashOutputDev(splashModeXBGR8, 4, false, bgColor, true);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, bgColor, true);
++#else
++ auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, false, bgColor, true);
++#endif
+ dev->setVectorAntialias(true);
+ dev->setFreeTypeHinting(true, false);
+ dev->startDoc(m_pdfDoc);
+- m_pdfDoc->displayPage(dev, pgNum, hDPI, vDPI, 0, true, false, false);
++ m_pdfDoc->displayPage(dev.get(), pgNum, hDPI, vDPI, 0, true, false, false);
+ SplashBitmap *bitmap = dev->getBitmap();
+ int bw = bitmap->getWidth();
+ int bh = bitmap->getHeight();
+@@ -888,7 +893,6 @@ QImage PdfPlug::readPreview(int pgNum, int width, int
+ pp.drawRect(cRect);
+ pp.end();
+ }
+- delete dev;
+ return image;
+ }
+
diff --git a/print/scribus/files/patch-scribus_plugins_import_pdf_pdftextrecognition.cpp b/print/scribus/files/patch-scribus_plugins_import_pdf_pdftextrecognition.cpp
new file mode 100644
--- /dev/null
+++ b/print/scribus/files/patch-scribus_plugins_import_pdf_pdftextrecognition.cpp
@@ -0,0 +1,38 @@
+--- scribus/plugins/import/pdf/pdftextrecognition.cpp.orig 2025-12-14 22:43:57 UTC
++++ scribus/plugins/import/pdf/pdftextrecognition.cpp
+@@ -81,7 +81,7 @@ PdfGlyph PdfTextRecognition::AddCharCommon(GfxState* s
+ */
+ PdfGlyph PdfTextRecognition::AddCharCommon(GfxState* state, double x, double y, double dx, double dy, Unicode const* u, int uLen)
+ {
+- const double * ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ QPointF charDelta1 = trans.map(QPointF(0.0, 0.0));
+ QPointF charDelta2 = trans.map(QPointF(dx, dy));
+@@ -121,7 +121,7 @@ PdfGlyph PdfTextRecognition::AddFirstChar(GfxState* st
+ setCharMode(AddCharMode::ADDBASICCHAR);
+
+ //only need to be called for the very first point
+- const double * ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ QPointF glyphPos = trans.map(QPointF(x, y));
+
+@@ -136,7 +136,7 @@ PdfGlyph PdfTextRecognition::AddBasicChar(GfxState* st
+ */
+ PdfGlyph PdfTextRecognition::AddBasicChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode const* u, int uLen)
+ {
+- const double * ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+
+ PdfGlyph newGlyph = AddCharCommon(state, x, y, dx, dy, u, uLen);
+@@ -461,7 +461,7 @@ void PdfTextOutputDev::updateTextPos(GfxState* state)
+ */
+ void PdfTextOutputDev::updateTextPos(GfxState* state)
+ {
+- const double * ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+
+ QPointF newPosition = trans.map(QPointF(state->getCurX(), state->getCurY()));
diff --git a/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.h b/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.h
new file mode 100644
--- /dev/null
+++ b/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.h
@@ -0,0 +1,14 @@
+--- scribus/plugins/import/pdf/slaoutput.h.orig 2025-12-14 22:43:57 UTC
++++ scribus/plugins/import/pdf/slaoutput.h
+@@ -142,7 +142,11 @@ class AnoOutputDev : public OutputDev (public)
+ void stroke(GfxState *state) override;
+ void eoFill(GfxState *state) override;
+ void fill(GfxState *state) override;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
++ void drawString(GfxState* state, const std::string& s) override;
++#else
+ void drawString(GfxState *state, const GooString *s) override;
++#endif
+
+ QString currColorText;
+ QString currColorFill;
diff --git a/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.cpp b/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.cpp
new file mode 100644
--- /dev/null
+++ b/print/scribus/files/patch-scribus_plugins_import_pdf_slaoutput.cpp
@@ -0,0 +1,458 @@
+--- scribus/plugins/import/pdf/slaoutput.cpp.orig 2025-12-14 22:43:57 UTC
++++ scribus/plugins/import/pdf/slaoutput.cpp
+@@ -124,8 +124,11 @@ LinkImportData::LinkImportData(Object *actionObj)
+ return;
+
+ Object obj3 = getFileSpecNameForPlatform(&obj1);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
+ if (!obj3.isNull())
++ fileName = make_unique<GooString>(obj3.getString());
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
++ if (!obj3.isNull())
+ fileName = obj3.getString()->copy();
+ #else
+ if (!obj3.isNull())
+@@ -160,7 +163,11 @@ void AnoOutputDev::stroke(GfxState *state)
+ currColorStroke = getColor(state->getStrokeColorSpace(), state->getStrokeColor(), &shade);
+ }
+
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
++void AnoOutputDev::drawString(GfxState* state, const std::string& s)
++#else
+ void AnoOutputDev::drawString(GfxState *state, const GooString *s)
++#endif
+ {
+ int shade = 100;
+ currColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
+@@ -172,7 +179,9 @@ void AnoOutputDev::drawString(GfxState *state, const G
+ if (state->getFont())
+ fontName.reset(state->getFont()->getName()->copy());
+ #endif
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
++ itemText = std::make_unique<GooString>(s);
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
+ itemText = s->copy();
+ #else
+ itemText.reset(s->copy());
+@@ -913,7 +922,11 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do
+ const Ref ref = childRef.getRef();
+ radList.append(ref.num);
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 3, 0)
++ QString tmTxt = UnicodeParsedString(annota->getUniqueName());
++#else
+ QString tmTxt = UnicodeParsedString(annota->getName());
++#endif
+ m_radioMap.insert(tmTxt, radList);
+ }
+ }
+@@ -1650,7 +1663,7 @@ void SlaOutputDev::adjustClip(GfxState *state, Qt::Fil
+
+ void SlaOutputDev::adjustClip(GfxState *state, Qt::FillRule fillRule)
+ {
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ QString output = convertPath(state->getPath());
+ if (output.isEmpty())
+@@ -1678,7 +1691,7 @@ void SlaOutputDev::stroke(GfxState *state)
+ void SlaOutputDev::stroke(GfxState *state)
+ {
+ // qDebug() << "Stroke";
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ double xCoor = m_doc->currentPage()->xOffset();
+ double yCoor = m_doc->currentPage()->yOffset();
+@@ -1786,8 +1799,7 @@ void SlaOutputDev::createFillItem(GfxState *state, Qt:
+
+ void SlaOutputDev::createFillItem(GfxState *state, Qt::FillRule fillRule)
+ {
+- const double *ctm;
+- ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ double xCoor = m_doc->currentPage()->xOffset();
+ double yCoor = m_doc->currentPage()->yOffset();
+@@ -1914,7 +1926,7 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, Gf
+ out = intersection(m_graphicStack.top().clipPath, out);
+ crect = out.boundingRect();
+ }
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ FPointArray gr;
+ gr.addPoint(GrStartX, GrStartY);
+@@ -2053,7 +2065,7 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, G
+ double GrFocalY = y1;
+ GrEndX = GrFocalX + r1;
+ GrEndY = GrFocalY;
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ FPointArray gr;
+ gr.addPoint(GrStartX, GrStartY);
+@@ -2138,7 +2150,7 @@ bool SlaOutputDev::gouraudTriangleShadedFill(GfxState
+ output += QString("Z");
+ m_pathIsClosed = true;
+ m_coords = output;
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ const auto& graphicState = m_graphicStack.top();
+ int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, graphicState.fillColor, CommonStrings::None);
+@@ -2219,7 +2231,7 @@ bool SlaOutputDev::patchMeshShadedFill(GfxState *state
+ output += QString("Z");
+ m_pathIsClosed = true;
+ m_coords = output;
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ const auto& graphicState = m_graphicStack.top();
+ int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, graphicState.fillColor, CommonStrings::None);
+@@ -2383,7 +2395,7 @@ bool SlaOutputDev::tilingPatternFill(GfxState *state,
+ box.x2 = bbox[2];
+ box.y2 = bbox[3];
+
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ QTransform mm(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ QTransform mmx = mm * m_ctm;
+@@ -2495,7 +2507,11 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje
+ {
+ // qDebug() << "Draw Image Mask";
+ auto imgStr = std::make_shared<ImageStream>(str, width, 1, 1);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool rewindDone = imgStr->rewind();
++ if (!rewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool resetDone = imgStr->reset();
+ if (!resetDone)
+ return;
+@@ -2576,7 +2592,11 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state
+ {
+ // qDebug() << "SlaOutputDev::drawSoftMaskedImage Masked Image Components" << colorMap->getNumPixelComps();
+ auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool rewindDone = imgStr->rewind();
++ if (!rewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool resetDone = imgStr->reset();
+ if (!resetDone)
+ return;
+@@ -2598,7 +2618,11 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state
+ return;
+
+ auto mskStr = std::make_shared<ImageStream>(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool mskRewindDone = mskStr->rewind();
++ if (!mskRewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool mskResetDone = mskStr->reset();
+ if (!mskResetDone)
+ return;
+@@ -2660,7 +2684,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob
+ {
+ // qDebug() << "SlaOutputDev::drawMaskedImage";
+ auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool rewindDone = imgStr->rewind();
++ if (!rewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool resetDone = imgStr->reset();
+ if (resetDone)
+ return;
+@@ -2682,7 +2710,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob
+ return;
+
+ auto mskStr = std::make_shared<ImageStream>(maskStr, maskWidth, 1, 1);
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool mskRewindDone = mskStr->rewind();
++ if (!mskRewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool mskResetDone = mskStr->reset();
+ if (!mskResetDone)
+ return;
+@@ -2732,7 +2764,11 @@ void SlaOutputDev::drawImage(GfxState *state, Object *
+ void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int* maskColors, bool inlineImg)
+ {
+ auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ bool rewindDone = imgStr->rewind();
++ if (!rewindDone)
++ return;
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 02, 0)
+ bool resetDone = imgStr->reset();
+ if (!resetDone)
+ return;
+@@ -2810,7 +2846,7 @@ void SlaOutputDev::createImageFrame(QImage& image, Gfx
+ void SlaOutputDev::createImageFrame(QImage& image, GfxState *state, int numColorComponents)
+ {
+ // qDebug() << "SlaOutputDev::createImageFrame";
+- const double *ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ double xCoor = m_doc->currentPage()->xOffset();
+ double yCoor = m_doc->currentPage()->yOffset();
+
+@@ -3016,8 +3052,13 @@ void SlaOutputDev::beginMarkedContent(const char *name
+ return;
+ QString lName = QString("Layer_%1").arg(m_layerNum + 1);
+ Object obj = properties->lookup("Title");
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
+ if (obj.isString())
++ lName = QString(obj.getString().c_str());
++#else
++ if (obj.isString())
+ lName = QString(obj.getString()->c_str());
++#endif
+ for (const auto& layer : m_doc->Layers)
+ {
+ if (layer.Name == lName)
+@@ -3112,8 +3153,16 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #else
+ SlaOutFontFileID *id;
+ #endif
+- SplashFontFile *fontFile;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ std::shared_ptr<SplashFontFile> fontFile;
++#else
++ SplashFontFile *fontFile = nullptr;
++#endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ std::unique_ptr<SplashFontSrc> fontsrc;
++#else
+ SplashFontSrc *fontsrc = nullptr;
++#endif
+ Object refObj, strObj;
+ #if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 4, 0)
+ int tmpBufLen = 0;
+@@ -3123,12 +3172,24 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #else
+ int *codeToGID = nullptr;
+ #endif
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ std::array<double, 6> textMat;
++#else
+ const double *textMat = nullptr;
++#endif
+ double m11, m12, m21, m22, fontSize;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ std::array<SplashCoord, 4> mat = { 1.0, 0.0, 0.0, 1.0 };
++#else
+ SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
++#endif
+ int n = 0;
+ int faceIndex = 0;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
++ std::array<SplashCoord, 6> matrix = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
++#else
+ SplashCoord matrix[6] = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
++#endif
+
+ m_font = nullptr;
+
+@@ -3191,6 +3252,12 @@ void SlaOutputDev::updateFont(GfxState *state)
+ fontType = fontLoc->fontType;
+ }
+
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!fileName.empty())
++ fontsrc = std::make_unique<SplashFontSrc>(fileName);
++ else
++ fontsrc = std::make_unique<SplashFontSrc>(std::move(tmpBuf.value()));
++#else
+ fontsrc = new SplashFontSrc;
+ #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
+ if (!fileName.empty())
+@@ -3203,11 +3270,18 @@ void SlaOutputDev::updateFont(GfxState *state)
+ else
+ fontsrc->setBuf(tmpBuf, tmpBufLen, true);
+ #endif
++#endif
+
+ // load the font file
+ switch (fontType) {
+ case fontType1:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3222,7 +3296,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ break;
+ case fontType1C:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3237,7 +3317,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ break;
+ case fontType1COT:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3253,10 +3339,15 @@ void SlaOutputDev::updateFont(GfxState *state)
+ break;
+ case fontTrueType:
+ case fontTrueTypeOT:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ if (!fileName.empty())
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
+ else
++ ff = FoFiTrueType::make(fontsrc->buf(), fontLoc->fontNum);
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
++ if (!fileName.empty())
++ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
++ else
+ ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum);
+ #elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!fileName.empty())
+@@ -3294,7 +3385,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ n = 0;
+ }
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3316,7 +3413,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ break;
+ case fontCIDType0:
+ case fontCIDType0C:
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), std::move(fontsrc), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), fontsrc, fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3355,7 +3458,14 @@ void SlaOutputDev::updateFont(GfxState *state)
+ n = 0;
+ }
+ #endif
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
++ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+@@ -3403,10 +3513,15 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #endif
+ else
+ {
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
+ if (!fileName.empty())
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
+ else
++ ff = FoFiTrueType::make(fontsrc->buf(), fontLoc->fontNum);
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
++ if (!fileName.empty())
++ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
++ else
+ ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum);
+ #elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!fileName.empty())
+@@ -3436,7 +3551,13 @@ void SlaOutputDev::updateFont(GfxState *state)
+ delete ff;
+ #endif
+ }
+-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
++ {
++ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
++ goto err2;
++ }
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+@@ -3484,8 +3605,10 @@ void SlaOutputDev::updateFont(GfxState *state)
+ #if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
+ delete fontLoc;
+ #endif
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(26, 2, 0)
+ if (fontsrc && !fontsrc->isFile)
+ fontsrc->unref();
++#endif
+ return;
+
+ err2:
+@@ -3499,8 +3622,12 @@ err1:
+ #endif
+
+ err1:
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
++ fontsrc.reset();
++#else
+ if (fontsrc && !fontsrc->isFile)
+ fontsrc->unref();
++#endif
+ }
+
+ void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, const Unicode* u, int uLen)
+@@ -3554,7 +3681,7 @@ void SlaOutputDev::drawChar(GfxState* state, double x,
+ if (f & splashPathLast)
+ qPath.closeSubpath();
+ }
+- const double * ctm = state->getCTM();
++ const auto ctm = state->getCTM();
+ m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+ double xCoor = m_doc->currentPage()->xOffset();
+ double yCoor = m_doc->currentPage()->yOffset();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 4:30 PM (17 m, 17 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37190886
Default Alt Text
D56472.id175766.diff (64 KB)
Attached To
Mode
D56472: graphics/poppler{,-glib,-qt5,-qt6,-utils}: Update to 26.04.0
Attached
Detach File
Event Timeline
Log In to Comment