summaryrefslogtreecommitdiffstats
path: root/external/poppler
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/poppler
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/poppler')
-rw-r--r--external/poppler/ExternalPackage_poppler_data.mk297
-rw-r--r--external/poppler/Makefile7
-rw-r--r--external/poppler/Module_poppler.mk19
-rw-r--r--external/poppler/README1
-rw-r--r--external/poppler/StaticLibrary_poppler.mk152
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk30
-rw-r--r--external/poppler/UnpackedTarball_poppler_data.mk13
-rw-r--r--external/poppler/char_traits.patch11
-rw-r--r--external/poppler/disable-freetype.patch.141
-rw-r--r--external/poppler/disable-nss-and-gpgmepp.patch.176
-rw-r--r--external/poppler/inc/pch/precompiled_poppler.cxx12
-rw-r--r--external/poppler/inc/pch/precompiled_poppler.hxx109
-rw-r--r--external/poppler/pch.patch.011
-rw-r--r--external/poppler/poppler-config.patch.1490
-rw-r--r--external/poppler/sanitizer.patch18
15 files changed, 1287 insertions, 0 deletions
diff --git a/external/poppler/ExternalPackage_poppler_data.mk b/external/poppler/ExternalPackage_poppler_data.mk
new file mode 100644
index 0000000000..b85a73f0e6
--- /dev/null
+++ b/external/poppler/ExternalPackage_poppler_data.mk
@@ -0,0 +1,297 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,poppler_data,poppler_data))
+
+poppler_unicode-map-files = \
+ unicodeMap/Big5 \
+ unicodeMap/Big5ascii \
+ unicodeMap/EUC-CN \
+ unicodeMap/EUC-JP \
+ unicodeMap/GBK \
+ unicodeMap/ISO-2022-CN \
+ unicodeMap/ISO-2022-JP \
+ unicodeMap/ISO-2022-KR \
+ unicodeMap/ISO-8859-6 \
+ unicodeMap/ISO-8859-7 \
+ unicodeMap/ISO-8859-8 \
+ unicodeMap/ISO-8859-9 \
+ unicodeMap/KOI8-R \
+ unicodeMap/Latin2 \
+ unicodeMap/Shift-JIS \
+ unicodeMap/TIS-620 \
+ unicodeMap/Windows-1255
+
+
+poppler_cmap-files = \
+ cMap/Adobe-CNS1/Adobe-CNS1-0 \
+ cMap/Adobe-CNS1/Adobe-CNS1-1 \
+ cMap/Adobe-CNS1/Adobe-CNS1-2 \
+ cMap/Adobe-CNS1/Adobe-CNS1-3 \
+ cMap/Adobe-CNS1/Adobe-CNS1-4 \
+ cMap/Adobe-CNS1/Adobe-CNS1-5 \
+ cMap/Adobe-CNS1/Adobe-CNS1-6 \
+ cMap/Adobe-CNS1/Adobe-CNS1-7 \
+ cMap/Adobe-CNS1/Adobe-CNS1-B5pc \
+ cMap/Adobe-CNS1/Adobe-CNS1-ETen-B5 \
+ cMap/Adobe-CNS1/Adobe-CNS1-H-CID \
+ cMap/Adobe-CNS1/Adobe-CNS1-H-Host \
+ cMap/Adobe-CNS1/Adobe-CNS1-H-Mac \
+ cMap/Adobe-CNS1/Adobe-CNS1-UCS2 \
+ cMap/Adobe-CNS1/B5-H \
+ cMap/Adobe-CNS1/B5pc-H \
+ cMap/Adobe-CNS1/B5pc-UCS2 \
+ cMap/Adobe-CNS1/B5pc-UCS2C \
+ cMap/Adobe-CNS1/B5pc-V \
+ cMap/Adobe-CNS1/B5-V \
+ cMap/Adobe-CNS1/CNS1-H \
+ cMap/Adobe-CNS1/CNS1-V \
+ cMap/Adobe-CNS1/CNS2-H \
+ cMap/Adobe-CNS1/CNS2-V \
+ cMap/Adobe-CNS1/CNS-EUC-H \
+ cMap/Adobe-CNS1/CNS-EUC-V \
+ cMap/Adobe-CNS1/ETen-B5-H \
+ cMap/Adobe-CNS1/ETen-B5-UCS2 \
+ cMap/Adobe-CNS1/ETen-B5-V \
+ cMap/Adobe-CNS1/ETenms-B5-H \
+ cMap/Adobe-CNS1/ETenms-B5-V \
+ cMap/Adobe-CNS1/ETHK-B5-H \
+ cMap/Adobe-CNS1/ETHK-B5-V \
+ cMap/Adobe-CNS1/HKdla-B5-H \
+ cMap/Adobe-CNS1/HKdla-B5-V \
+ cMap/Adobe-CNS1/HKdlb-B5-H \
+ cMap/Adobe-CNS1/HKdlb-B5-V \
+ cMap/Adobe-CNS1/HKgccs-B5-H \
+ cMap/Adobe-CNS1/HKgccs-B5-V \
+ cMap/Adobe-CNS1/HKm314-B5-H \
+ cMap/Adobe-CNS1/HKm314-B5-V \
+ cMap/Adobe-CNS1/HKm471-B5-H \
+ cMap/Adobe-CNS1/HKm471-B5-V \
+ cMap/Adobe-CNS1/HKscs-B5-H \
+ cMap/Adobe-CNS1/HKscs-B5-V \
+ cMap/Adobe-CNS1/UCS2-B5pc \
+ cMap/Adobe-CNS1/UCS2-ETen-B5 \
+ cMap/Adobe-CNS1/UniCNS-UCS2-H \
+ cMap/Adobe-CNS1/UniCNS-UCS2-V \
+ cMap/Adobe-CNS1/UniCNS-UTF16-H \
+ cMap/Adobe-CNS1/UniCNS-UTF16-V \
+ cMap/Adobe-CNS1/UniCNS-UTF32-H \
+ cMap/Adobe-CNS1/UniCNS-UTF32-V \
+ cMap/Adobe-CNS1/UniCNS-UTF8-H \
+ cMap/Adobe-CNS1/UniCNS-UTF8-V \
+ cMap/Adobe-GB1/Adobe-GB1-0 \
+ cMap/Adobe-GB1/Adobe-GB1-1 \
+ cMap/Adobe-GB1/Adobe-GB1-2 \
+ cMap/Adobe-GB1/Adobe-GB1-3 \
+ cMap/Adobe-GB1/Adobe-GB1-4 \
+ cMap/Adobe-GB1/Adobe-GB1-5 \
+ cMap/Adobe-GB1/Adobe-GB1-GBK-EUC \
+ cMap/Adobe-GB1/Adobe-GB1-GBpc-EUC \
+ cMap/Adobe-GB1/Adobe-GB1-H-CID \
+ cMap/Adobe-GB1/Adobe-GB1-H-Host \
+ cMap/Adobe-GB1/Adobe-GB1-H-Mac \
+ cMap/Adobe-GB1/Adobe-GB1-UCS2 \
+ cMap/Adobe-GB1/GB-EUC-H \
+ cMap/Adobe-GB1/GB-EUC-V \
+ cMap/Adobe-GB1/GB-H \
+ cMap/Adobe-GB1/GB-V \
+ cMap/Adobe-GB1/GBK2K-H \
+ cMap/Adobe-GB1/GBK2K-V \
+ cMap/Adobe-GB1/GBK-EUC-H \
+ cMap/Adobe-GB1/GBK-EUC-UCS2 \
+ cMap/Adobe-GB1/GBK-EUC-V \
+ cMap/Adobe-GB1/GBKp-EUC-H \
+ cMap/Adobe-GB1/GBKp-EUC-V \
+ cMap/Adobe-GB1/GBpc-EUC-H \
+ cMap/Adobe-GB1/GBpc-EUC-UCS2 \
+ cMap/Adobe-GB1/GBpc-EUC-UCS2C \
+ cMap/Adobe-GB1/GBpc-EUC-V \
+ cMap/Adobe-GB1/GBT-EUC-H \
+ cMap/Adobe-GB1/GBT-EUC-V \
+ cMap/Adobe-GB1/GBT-H \
+ cMap/Adobe-GB1/GBT-V \
+ cMap/Adobe-GB1/GBTpc-EUC-H \
+ cMap/Adobe-GB1/GBTpc-EUC-V \
+ cMap/Adobe-GB1/UCS2-GBK-EUC \
+ cMap/Adobe-GB1/UCS2-GBpc-EUC \
+ cMap/Adobe-GB1/UniGB-UCS2-H \
+ cMap/Adobe-GB1/UniGB-UCS2-V \
+ cMap/Adobe-GB1/UniGB-UTF16-H \
+ cMap/Adobe-GB1/UniGB-UTF16-V \
+ cMap/Adobe-GB1/UniGB-UTF32-H \
+ cMap/Adobe-GB1/UniGB-UTF32-V \
+ cMap/Adobe-GB1/UniGB-UTF8-H \
+ cMap/Adobe-GB1/UniGB-UTF8-V \
+ cMap/Adobe-Japan1/78-EUC-H \
+ cMap/Adobe-Japan1/78-EUC-V \
+ cMap/Adobe-Japan1/78-H \
+ cMap/Adobe-Japan1/78-RKSJ-H \
+ cMap/Adobe-Japan1/78-RKSJ-V \
+ cMap/Adobe-Japan1/78-V \
+ cMap/Adobe-Japan1/78ms-RKSJ-H \
+ cMap/Adobe-Japan1/78ms-RKSJ-V \
+ cMap/Adobe-Japan1/83pv-RKSJ-H \
+ cMap/Adobe-Japan1/90ms-RKSJ-H \
+ cMap/Adobe-Japan1/90ms-RKSJ-UCS2 \
+ cMap/Adobe-Japan1/90ms-RKSJ-V \
+ cMap/Adobe-Japan1/90msp-RKSJ-H \
+ cMap/Adobe-Japan1/90msp-RKSJ-V \
+ cMap/Adobe-Japan1/90pv-RKSJ-H \
+ cMap/Adobe-Japan1/90pv-RKSJ-UCS2 \
+ cMap/Adobe-Japan1/90pv-RKSJ-UCS2C \
+ cMap/Adobe-Japan1/90pv-RKSJ-V \
+ cMap/Adobe-Japan1/Add-H \
+ cMap/Adobe-Japan1/Add-RKSJ-H \
+ cMap/Adobe-Japan1/Add-RKSJ-V \
+ cMap/Adobe-Japan1/Add-V \
+ cMap/Adobe-Japan1/Adobe-Japan1-0 \
+ cMap/Adobe-Japan1/Adobe-Japan1-1 \
+ cMap/Adobe-Japan1/Adobe-Japan1-2 \
+ cMap/Adobe-Japan1/Adobe-Japan1-3 \
+ cMap/Adobe-Japan1/Adobe-Japan1-4 \
+ cMap/Adobe-Japan1/Adobe-Japan1-5 \
+ cMap/Adobe-Japan1/Adobe-Japan1-6 \
+ cMap/Adobe-Japan1/Adobe-Japan1-7 \
+ cMap/Adobe-Japan1/Adobe-Japan1-90ms-RKSJ \
+ cMap/Adobe-Japan1/Adobe-Japan1-90pv-RKSJ \
+ cMap/Adobe-Japan1/Adobe-Japan1-H-CID \
+ cMap/Adobe-Japan1/Adobe-Japan1-H-Host \
+ cMap/Adobe-Japan1/Adobe-Japan1-H-Mac \
+ cMap/Adobe-Japan1/Adobe-Japan1-PS-H \
+ cMap/Adobe-Japan1/Adobe-Japan1-PS-V \
+ cMap/Adobe-Japan1/Adobe-Japan1-UCS2 \
+ cMap/Adobe-Japan1/EUC-H \
+ cMap/Adobe-Japan1/EUC-V \
+ cMap/Adobe-Japan1/Ext-H \
+ cMap/Adobe-Japan1/Ext-RKSJ-H \
+ cMap/Adobe-Japan1/Ext-RKSJ-V \
+ cMap/Adobe-Japan1/Ext-V \
+ cMap/Adobe-Japan1/H \
+ cMap/Adobe-Japan1/Hankaku \
+ cMap/Adobe-Japan1/Hiragana \
+ cMap/Adobe-Japan1/Hojo-EUC-H \
+ cMap/Adobe-Japan1/Hojo-EUC-V \
+ cMap/Adobe-Japan1/Hojo-H \
+ cMap/Adobe-Japan1/Hojo-V \
+ cMap/Adobe-Japan1/Katakana \
+ cMap/Adobe-Japan1/NWP-H \
+ cMap/Adobe-Japan1/NWP-V \
+ cMap/Adobe-Japan1/RKSJ-H \
+ cMap/Adobe-Japan1/RKSJ-V \
+ cMap/Adobe-Japan1/Roman \
+ cMap/Adobe-Japan1/UCS2-90ms-RKSJ \
+ cMap/Adobe-Japan1/UCS2-90pv-RKSJ \
+ cMap/Adobe-Japan1/UniHojo-UCS2-H \
+ cMap/Adobe-Japan1/UniHojo-UCS2-V \
+ cMap/Adobe-Japan1/UniHojo-UTF16-H \
+ cMap/Adobe-Japan1/UniHojo-UTF16-V \
+ cMap/Adobe-Japan1/UniHojo-UTF32-H \
+ cMap/Adobe-Japan1/UniHojo-UTF32-V \
+ cMap/Adobe-Japan1/UniHojo-UTF8-H \
+ cMap/Adobe-Japan1/UniHojo-UTF8-V \
+ cMap/Adobe-Japan1/UniJIS2004-UTF16-H \
+ cMap/Adobe-Japan1/UniJIS2004-UTF16-V \
+ cMap/Adobe-Japan1/UniJIS2004-UTF32-H \
+ cMap/Adobe-Japan1/UniJIS2004-UTF32-V \
+ cMap/Adobe-Japan1/UniJIS2004-UTF8-H \
+ cMap/Adobe-Japan1/UniJIS2004-UTF8-V \
+ cMap/Adobe-Japan1/UniJIS-UCS2-H \
+ cMap/Adobe-Japan1/UniJIS-UCS2-HW-H \
+ cMap/Adobe-Japan1/UniJIS-UCS2-HW-V \
+ cMap/Adobe-Japan1/UniJIS-UCS2-V \
+ cMap/Adobe-Japan1/UniJIS-UTF16-H \
+ cMap/Adobe-Japan1/UniJIS-UTF16-V \
+ cMap/Adobe-Japan1/UniJIS-UTF32-H \
+ cMap/Adobe-Japan1/UniJIS-UTF32-V \
+ cMap/Adobe-Japan1/UniJIS-UTF8-H \
+ cMap/Adobe-Japan1/UniJIS-UTF8-V \
+ cMap/Adobe-Japan1/UniJISPro-UCS2-HW-V \
+ cMap/Adobe-Japan1/UniJISPro-UCS2-V \
+ cMap/Adobe-Japan1/UniJISPro-UTF8-V \
+ cMap/Adobe-Japan1/UniJISX0213-UTF32-H \
+ cMap/Adobe-Japan1/UniJISX0213-UTF32-V \
+ cMap/Adobe-Japan1/UniJISX02132004-UTF32-H \
+ cMap/Adobe-Japan1/UniJISX02132004-UTF32-V \
+ cMap/Adobe-Japan1/V \
+ cMap/Adobe-Japan1/WP-Symbol \
+ cMap/Adobe-Japan2/Adobe-Japan2-0 \
+ cMap/Adobe-Korea1/Adobe-Korea1-0 \
+ cMap/Adobe-Korea1/Adobe-Korea1-1 \
+ cMap/Adobe-Korea1/Adobe-Korea1-2 \
+ cMap/Adobe-Korea1/Adobe-Korea1-H-CID \
+ cMap/Adobe-Korea1/Adobe-Korea1-H-Host \
+ cMap/Adobe-Korea1/Adobe-Korea1-H-Mac \
+ cMap/Adobe-Korea1/Adobe-Korea1-KSCms-UHC \
+ cMap/Adobe-Korea1/Adobe-Korea1-KSCpc-EUC \
+ cMap/Adobe-Korea1/Adobe-Korea1-UCS2 \
+ cMap/Adobe-Korea1/KSC-EUC-H \
+ cMap/Adobe-Korea1/KSC-EUC-V \
+ cMap/Adobe-Korea1/KSC-H \
+ cMap/Adobe-Korea1/KSC-Johab-H \
+ cMap/Adobe-Korea1/KSC-Johab-V \
+ cMap/Adobe-Korea1/KSC-V \
+ cMap/Adobe-Korea1/KSCms-UHC-H \
+ cMap/Adobe-Korea1/KSCms-UHC-HW-H \
+ cMap/Adobe-Korea1/KSCms-UHC-HW-V \
+ cMap/Adobe-Korea1/KSCms-UHC-UCS2 \
+ cMap/Adobe-Korea1/KSCms-UHC-V \
+ cMap/Adobe-Korea1/KSCpc-EUC-H \
+ cMap/Adobe-Korea1/KSCpc-EUC-UCS2 \
+ cMap/Adobe-Korea1/KSCpc-EUC-UCS2C \
+ cMap/Adobe-Korea1/KSCpc-EUC-V \
+ cMap/Adobe-Korea1/UCS2-KSCms-UHC \
+ cMap/Adobe-Korea1/UCS2-KSCpc-EUC \
+ cMap/Adobe-Korea1/UniKS-UCS2-H \
+ cMap/Adobe-Korea1/UniKS-UCS2-V \
+ cMap/Adobe-Korea1/UniKS-UTF16-H \
+ cMap/Adobe-Korea1/UniKS-UTF16-V \
+ cMap/Adobe-Korea1/UniKS-UTF32-H \
+ cMap/Adobe-Korea1/UniKS-UTF32-V \
+ cMap/Adobe-Korea1/UniKS-UTF8-H \
+ cMap/Adobe-Korea1/UniKS-UTF8-V \
+ cMap/Adobe-KR/Adobe-KR-0 \
+ cMap/Adobe-KR/Adobe-KR-1 \
+ cMap/Adobe-KR/Adobe-KR-2 \
+ cMap/Adobe-KR/Adobe-KR-3 \
+ cMap/Adobe-KR/Adobe-KR-4 \
+ cMap/Adobe-KR/Adobe-KR-5 \
+ cMap/Adobe-KR/Adobe-KR-6 \
+ cMap/Adobe-KR/Adobe-KR-7 \
+ cMap/Adobe-KR/Adobe-KR-8 \
+ cMap/Adobe-KR/Adobe-KR-9 \
+ cMap/Adobe-KR/Adobe-KR-UCS2 \
+ cMap/Adobe-KR/UniAKR-UTF16-H \
+ cMap/Adobe-KR/UniAKR-UTF32-H \
+ cMap/Adobe-KR/UniAKR-UTF8-H
+
+poppler_name-to-unicode-files = \
+ nameToUnicode/Bulgarian \
+ nameToUnicode/Greek \
+ nameToUnicode/Thai
+
+poppler_cid-to-unicode-files = \
+ cidToUnicode/Adobe-CNS1 \
+ cidToUnicode/Adobe-GB1 \
+ cidToUnicode/Adobe-Japan1 \
+ cidToUnicode/Adobe-Korea1
+
+poppler_DISTFILES = \
+ README \
+ COPYING \
+ COPYING.adobe \
+ COPYING.gpl2 \
+ $(poppler_unicode-map-files) \
+ $(poppler_cmap-files) \
+ $(poppler_name-to-unicode-files) \
+ $(poppler_cid-to-unicode-files)
+
+$(eval $(call gb_ExternalPackage_add_unpacked_files_with_dir,poppler_data,$(LIBO_SHARE_FOLDER)/xpdfimport/poppler_data,\
+ $(poppler_DISTFILES)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/Makefile b/external/poppler/Makefile
new file mode 100644
index 0000000000..e4968cf85f
--- /dev/null
+++ b/external/poppler/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/Module_poppler.mk b/external/poppler/Module_poppler.mk
new file mode 100644
index 0000000000..a35bae436a
--- /dev/null
+++ b/external/poppler/Module_poppler.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,poppler))
+
+$(eval $(call gb_Module_add_targets,poppler,\
+ StaticLibrary_poppler \
+ UnpackedTarball_poppler \
+ ExternalPackage_poppler_data \
+ UnpackedTarball_poppler_data \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/README b/external/poppler/README
new file mode 100644
index 0000000000..08d3612c35
--- /dev/null
+++ b/external/poppler/README
@@ -0,0 +1 @@
+From [https://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
new file mode 100644
index 0000000000..7b6f958245
--- /dev/null
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -0,0 +1,152 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,poppler))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler))
+
+$(eval $(call gb_StaticLibrary_set_precompiled_header,poppler,external/poppler/inc/pch/precompiled_poppler))
+
+$(eval $(call gb_StaticLibrary_use_externals,poppler,\
+ libjpeg \
+ zlib \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,poppler))
+
+$(eval $(call gb_StaticLibrary_set_include,poppler,\
+ -I$(WORKDIR)/UnpackedTarball/poppler \
+ -I$(WORKDIR)/UnpackedTarball/poppler/fofi \
+ -I$(WORKDIR)/UnpackedTarball/poppler/goo \
+ -I$(WORKDIR)/UnpackedTarball/poppler/poppler \
+ $$(INCLUDE) \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_defs,poppler,\
+ -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_WARNINGS \
+))
+$(eval $(call gb_StaticLibrary_add_cxxflags,poppler,\
+ /Zc:wchar_t- \
+))
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,poppler,cc))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,poppler,\
+ UnpackedTarball/poppler/poppler/CourierWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/CourierBoldWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/CourierBoldObliqueWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/CourierObliqueWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/HelveticaWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/HelveticaBoldWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/HelveticaBoldObliqueWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/HelveticaObliqueWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/SymbolWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/TimesBoldWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/TimesBoldItalicWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/TimesItalicWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/TimesRomanWidths.pregenerated \
+ UnpackedTarball/poppler/poppler/ZapfDingbatsWidths.pregenerated \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
+ UnpackedTarball/poppler/goo/gbase64 \
+ UnpackedTarball/poppler/goo/gbasename \
+ UnpackedTarball/poppler/goo/gfile \
+ UnpackedTarball/poppler/goo/glibc \
+ UnpackedTarball/poppler/goo/glibc_strtok_r \
+ UnpackedTarball/poppler/goo/grandom \
+ UnpackedTarball/poppler/goo/gstrtod \
+ UnpackedTarball/poppler/goo/GooString \
+ UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/ImgWriter \
+ UnpackedTarball/poppler/goo/JpegWriter \
+ UnpackedTarball/poppler/goo/NetPBMWriter \
+ UnpackedTarball/poppler/goo/PNGWriter \
+ UnpackedTarball/poppler/goo/TiffWriter \
+ UnpackedTarball/poppler/fofi/FoFiBase \
+ UnpackedTarball/poppler/fofi/FoFiEncodings \
+ UnpackedTarball/poppler/fofi/FoFiIdentifier \
+ UnpackedTarball/poppler/fofi/FoFiTrueType \
+ UnpackedTarball/poppler/fofi/FoFiType1 \
+ UnpackedTarball/poppler/fofi/FoFiType1C \
+ UnpackedTarball/poppler/poppler/Annot \
+ UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
+ UnpackedTarball/poppler/poppler/Array \
+ UnpackedTarball/poppler/poppler/BBoxOutputDev \
+ UnpackedTarball/poppler/poppler/CachedFile \
+ UnpackedTarball/poppler/poppler/Catalog \
+ UnpackedTarball/poppler/poppler/CertificateInfo \
+ UnpackedTarball/poppler/poppler/CharCodeToUnicode \
+ UnpackedTarball/poppler/poppler/CMap \
+ UnpackedTarball/poppler/poppler/DCTStream \
+ UnpackedTarball/poppler/poppler/DateInfo \
+ UnpackedTarball/poppler/poppler/Decrypt \
+ UnpackedTarball/poppler/poppler/Dict \
+ UnpackedTarball/poppler/poppler/Error \
+ UnpackedTarball/poppler/poppler/FDPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/FILECacheLoader \
+ UnpackedTarball/poppler/poppler/FileSpec \
+ UnpackedTarball/poppler/poppler/FlateEncoder \
+ UnpackedTarball/poppler/poppler/FontEncodingTables \
+ UnpackedTarball/poppler/poppler/FontInfo \
+ UnpackedTarball/poppler/poppler/Form \
+ UnpackedTarball/poppler/poppler/Function \
+ UnpackedTarball/poppler/poppler/Gfx \
+ UnpackedTarball/poppler/poppler/GfxFont \
+ UnpackedTarball/poppler/poppler/GfxState \
+ UnpackedTarball/poppler/poppler/GlobalParams \
+ UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/ImageEmbeddingUtils \
+ UnpackedTarball/poppler/poppler/JArithmeticDecoder \
+ UnpackedTarball/poppler/poppler/JBIG2Stream \
+ UnpackedTarball/poppler/poppler/JSInfo \
+ UnpackedTarball/poppler/poppler/Lexer \
+ UnpackedTarball/poppler/poppler/Linearization \
+ UnpackedTarball/poppler/poppler/Link \
+ UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/MarkedContentOutputDev \
+ UnpackedTarball/poppler/poppler/Movie \
+ UnpackedTarball/poppler/poppler/NameToCharCode \
+ UnpackedTarball/poppler/poppler/Object \
+ UnpackedTarball/poppler/poppler/OptionalContent \
+ UnpackedTarball/poppler/poppler/Outline \
+ UnpackedTarball/poppler/poppler/OutputDev \
+ UnpackedTarball/poppler/poppler/Page \
+ UnpackedTarball/poppler/poppler/PageLabelInfo \
+ UnpackedTarball/poppler/poppler/PageTransition \
+ UnpackedTarball/poppler/poppler/Parser \
+ UnpackedTarball/poppler/poppler/PDFDoc \
+ UnpackedTarball/poppler/poppler/PDFDocBuilder \
+ UnpackedTarball/poppler/poppler/PDFDocEncoding \
+ UnpackedTarball/poppler/poppler/PDFDocFactory \
+ UnpackedTarball/poppler/poppler/PreScanOutputDev \
+ UnpackedTarball/poppler/poppler/ProfileData \
+ UnpackedTarball/poppler/poppler/PSOutputDev \
+ UnpackedTarball/poppler/poppler/PSTokenizer \
+ UnpackedTarball/poppler/poppler/Rendition \
+ UnpackedTarball/poppler/poppler/SecurityHandler \
+ UnpackedTarball/poppler/poppler/SignatureInfo \
+ UnpackedTarball/poppler/poppler/Sound \
+ UnpackedTarball/poppler/poppler/Stream \
+ UnpackedTarball/poppler/poppler/StructElement \
+ UnpackedTarball/poppler/poppler/StructTreeRoot \
+ UnpackedTarball/poppler/poppler/TextOutputDev \
+ UnpackedTarball/poppler/poppler/UTF \
+ UnpackedTarball/poppler/poppler/UnicodeMap \
+ UnpackedTarball/poppler/poppler/UnicodeMapFuncs \
+ UnpackedTarball/poppler/poppler/UnicodeTypeTable \
+ UnpackedTarball/poppler/poppler/ViewerPreferences \
+ UnpackedTarball/poppler/poppler/XRef \
+ UnpackedTarball/poppler/splash/SplashBitmap \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
new file mode 100644
index 0000000000..c6ddbf9785
--- /dev/null
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -0,0 +1,30 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,poppler,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
+ external/poppler/char_traits.patch \
+ external/poppler/disable-freetype.patch.1 \
+ external/poppler/disable-nss-and-gpgmepp.patch.1 \
+ external/poppler/poppler-config.patch.1 \
+ external/poppler/pch.patch.0 \
+))
+
+ifneq ($(filter -fsanitize=%,$(CC)),)
+$(eval $(call gb_UnpackedTarball_add_patches,poppler, \
+ external/poppler/sanitizer.patch \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/UnpackedTarball_poppler_data.mk b/external/poppler/UnpackedTarball_poppler_data.mk
new file mode 100644
index 0000000000..e0357df5a1
--- /dev/null
+++ b/external/poppler/UnpackedTarball_poppler_data.mk
@@ -0,0 +1,13 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler_data))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,poppler_data,$(POPPLER_DATA_TARBALL),,poppler_data))
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/char_traits.patch b/external/poppler/char_traits.patch
new file mode 100644
index 0000000000..3483f2fe22
--- /dev/null
+++ b/external/poppler/char_traits.patch
@@ -0,0 +1,11 @@
+--- cpp/poppler-global.h
++++ cpp/poppler-global.h
+@@ -98,7 +98,7 @@
+ # pragma warning(push)
+ # pragma warning(disable : 4251) /* class 'A' needs to have dll interface for to be used by clients of class 'B'. */
+ #endif
+-class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
++class POPPLER_CPP_EXPORT ustring : public std::u16string
+ {
+ public:
+ ustring();
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
new file mode 100644
index 0000000000..3c4d1d0f7a
--- /dev/null
+++ b/external/poppler/disable-freetype.patch.1
@@ -0,0 +1,41 @@
+disable freetype dependent code
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-14 18:50:22.232312300 +0900
+@@ -48,7 +48,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cctype>
+-#include "goo/ft_utils.h"
++//#include "goo/ft_utils.h"
+ #include "goo/gmem.h"
+ #include "goo/gfile.h"
+ #include "goo/GooString.h"
+@@ -78,8 +78,8 @@
+ #include "fofi/FoFiTrueType.h"
+ #include "fofi/FoFiIdentifier.h"
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+ #include <unordered_set>
+
+ // helper for using std::visit to get a dependent false for static_asserts
+@@ -2760,6 +2760,8 @@
+
+ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName)
+ {
++ return {};
++#if 0
+ if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".otf")) {
+ error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str());
+ return {};
+@@ -2994,6 +2996,7 @@
+ }
+
+ return { dictFontName, fontDictRef };
++#endif
+ }
+
+ std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 b/external/poppler/disable-nss-and-gpgmepp.patch.1
new file mode 100644
index 0000000000..01b442f53a
--- /dev/null
+++ b/external/poppler/disable-nss-and-gpgmepp.patch.1
@@ -0,0 +1,76 @@
+disable NSS/GPGMEPP dependent code.
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-17 16:51:27.873431500 +0900
+@@ -64,7 +64,7 @@
+ #include "Form.h"
+ #include "PDFDoc.h"
+ #include "DateInfo.h"
+-#include "CryptoSignBackend.h"
++/*#include "CryptoSignBackend.h"*/
+ #include "SignatureInfo.h"
+ #include "CertificateInfo.h"
+ #include "XRef.h"
+@@ -577,7 +577,7 @@
+ {
+ return static_cast<FormFieldSignature *>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA);
+ }
+-
++#if 0
+ // update hash with the specified range of data from the file
+ static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, Goffset start, Goffset end)
+ {
+@@ -607,10 +607,12 @@
+ delete[] buf;
+ return true;
+ }
++#endif
+
+ bool FormWidgetSignature::signDocument(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location, const std::optional<GooString> &ownerPassword,
+ const std::optional<GooString> &userPassword)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return false;
+@@ -698,6 +700,8 @@
+ fclose(file);
+
+ return true;
++#endif
++ return false;
+ }
+
+ bool FormWidgetSignature::signDocumentWithAppearance(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location,
+@@ -2316,6 +2320,7 @@
+
+ void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len)
+ {
++#if 0
+ if (!handler) {
+ return;
+ }
+@@ -2335,6 +2340,7 @@
+ i += BLOCK_SIZE;
+ }
+ }
++#endif
+ }
+
+ FormSignatureType FormWidgetSignature::signatureType() const
+@@ -2349,6 +2355,7 @@
+
+ SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return signature_info;
+@@ -2425,6 +2432,7 @@
+ const CertificateValidationStatus cert_val_state = signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA);
+ signature_info->setCertificateValStatus(cert_val_state);
+
++#endif
+ return signature_info;
+ }
+
diff --git a/external/poppler/inc/pch/precompiled_poppler.cxx b/external/poppler/inc/pch/precompiled_poppler.cxx
new file mode 100644
index 0000000000..5b97c67a77
--- /dev/null
+++ b/external/poppler/inc/pch/precompiled_poppler.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_poppler.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/poppler/inc/pch/precompiled_poppler.hxx b/external/poppler/inc/pch/precompiled_poppler.hxx
new file mode 100644
index 0000000000..50944b80da
--- /dev/null
+++ b/external/poppler/inc/pch/precompiled_poppler.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2023-06-18 21:15:26 using:
+ ./bin/update_pch external/poppler poppler --cutoff=1 --exclude:system --include:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./external/poppler/inc/pch/precompiled_poppler.hxx "make external/poppler.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#include <Object.h>
+#include <algorithm>
+#include <annot_stamp_approved.h>
+#include <annot_stamp_as_is.h>
+#include <annot_stamp_confidential.h>
+#include <annot_stamp_departmental.h>
+#include <annot_stamp_draft.h>
+#include <annot_stamp_experimental.h>
+#include <annot_stamp_expired.h>
+#include <annot_stamp_final.h>
+#include <annot_stamp_for_comment.h>
+#include <annot_stamp_for_public_release.h>
+#include <annot_stamp_not_approved.h>
+#include <annot_stamp_not_for_public_release.h>
+#include <annot_stamp_sold.h>
+#include <annot_stamp_top_secret.h>
+#include <array>
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <config.h>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+#include <gbase64.h>
+#include <gbasename.h>
+#include <gdir.h>
+#include <gfile.h>
+#include <glibc.h>
+#include <gmem.h>
+#include <grandom.h>
+#include <gstrtod.h>
+#include <iomanip>
+#include <iostream>
+#include <limits>
+#include <memory>
+#include <poppler-config.h>
+#include <random>
+#include <regex>
+#include <set>
+#include <sstream>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <fofi/FoFiIdentifier.h>
+#include <fofi/FoFiTrueType.h>
+#include <fofi/FoFiType1.h>
+#include <fofi/FoFiType1C.h>
+#include <goo/GooCheckedOps.h>
+#include <goo/GooLikely.h>
+#include <goo/GooString.h>
+#include <goo/GooTimer.h>
+#include <goo/ImgWriter.h>
+#include <goo/JpegWriter.h>
+#include <goo/PNGWriter.h>
+#include <goo/TiffWriter.h>
+#include <goo/gdir.h>
+#include <goo/gfile.h>
+#include <goo/glibc.h>
+#include <goo/gmem.h>
+#include <goo/grandom.h>
+#include <goo/gstrtod.h>
+#include <poppler/Error.h>
+#include <poppler/GfxState.h>
+#include <poppler/GfxState_helpers.h>
+#include <splash/Splash.h>
+#include <splash/SplashBitmap.h>
+#include <splash/SplashTypes.h>
+#include <sys/stat.h>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/poppler/pch.patch.0 b/external/poppler/pch.patch.0
new file mode 100644
index 0000000000..9ffeeb8421
--- /dev/null
+++ b/external/poppler/pch.patch.0
@@ -0,0 +1,11 @@
+--- ./goo/gdir.h.sav 2021-01-02 17:54:42.000000000 +0100
++++ ./goo/gdir.h 2021-11-03 15:16:04.306277081 +0100
+@@ -37,6 +37,8 @@
+
+ #include <memory>
+
++#include "gfile.h"
++
+ class GooString;
+
+ #if defined(_WIN32)
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
new file mode 100644
index 0000000000..8f71e987b2
--- /dev/null
+++ b/external/poppler/poppler-config.patch.1
@@ -0,0 +1,490 @@
+*three* poppler config headers
+
+note: to get the 3rd one, use -DENABLE_CPP=on
+
+mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off
+
+manually disabled these because cmake failed to do it:
+HAVE_CAIRO
+ENABLE_NSS3
+ENABLE_LIBPNG (twice!)
+ENABLE_LIBTIFF (twice!)
+ENABLE_LIBCURL
+
+diff --git a/config.h b/config.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/config.h
+@@ -0,0 +1,229 @@
++/* config.h. Generated from config.h.cmake by cmake. */
++
++/* Build against libcurl. */
++/* #undef ENABLE_LIBCURL */
++
++/* Use libjpeg instead of builtin jpeg decoder. */
++#define ENABLE_LIBJPEG 1
++
++/* Use libopenjpeg instead of builtin jpeg2000 decoder. */
++/* #undef ENABLE_LIBOPENJPEG */
++
++/* Build against libtiff. */
++/* #define ENABLE_LIBTIFF 1 */
++
++/* Build against libpng. */
++/* #define ENABLE_LIBPNG 1 */
++
++/* Do not hardcode the library location */
++/* #undef ENABLE_RELOCATABLE */
++
++/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */
++/* #undef ENABLE_ZLIB_UNCOMPRESS */
++
++/* Build against libnss3 for digital signature validation */
++/* #define ENABLE_NSS3 1 */
++
++/* Build against libgpgme for digital signature validation */
++/* #undef ENABLE_GPGME */
++
++/* Signatures enabled */
++/* #define ENABLE_SIGNATURES 1 */
++
++/* Default signature backend */
++/* #define DEFAULT_SIGNATURE_BACKEND "NSS" */
++
++/* Use cairo for rendering. */
++/* #define HAVE_CAIRO 1 */
++
++/* Do we have any DCT decoder?. */
++#define HAVE_DCT_DECODER 1
++
++/* Do we have any JPX decoder?. */
++/* #undef HAVE_JPX_DECODER */
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++ */
++#define HAVE_DIRENT_H 1
++#endif
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++#endif
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define HAVE_FCNTL_H 1
++
++/* Define to 1 if you have the `fseek64' function. */
++/* #undef HAVE_FSEEK64 */
++
++#if !defined(_WIN32)
++/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
++#define HAVE_FSEEKO 1
++#endif
++
++/* Define to 1 if you have the `ftell64' function. */
++/* #undef HAVE_FTELL64 */
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the `pread64' function. */
++#define HAVE_PREAD64 1
++#endif
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the `lseek64' function. */
++#define HAVE_LSEEK64 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if gettimeofday is available on your system */
++#define HAVE_GETTIMEOFDAY 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if gmtime_r is available on your system */
++#define HAVE_GMTIME_R 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if timegm is available on your system */
++#define HAVE_TIMEGM 1
++#endif
++
++/* Define to 1 if you have the `z' library (-lz). */
++/* #undef HAVE_LIBZ */
++
++#if !defined(_WIN32)
++/* Defines if localtime_r is available on your system */
++#define HAVE_LOCALTIME_R 1
++#endif
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the `mkstemp' function. */
++#define HAVE_MKSTEMP 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if strtok_r is available on your system */
++#define HAVE_STRTOK_R 1
++#endif
++
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++/* #undef HAVE_NDIR_H */
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the `popen' function. */
++#define HAVE_POPEN 1
++#endif
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++ */
++#define HAVE_SYS_DIR_H 1
++#endif
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the <sys/mman.h> header file. */
++#define HAVE_SYS_MMAN_H 1
++#endif
++
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++ */
++/* #undef HAVE_SYS_NDIR_H */
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++#endif
++
++/* Define to 1 if you have a big endian machine */
++/* #undef WORDS_BIGENDIAN */
++
++/* Define as const if the declaration of iconv() needs const. */
++#define ICONV_CONST
++
++/* Generate OPI comments in PS output. */
++#define OPI_SUPPORT 1
++
++/* Name of package */
++#define PACKAGE "poppler"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=poppler"
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME "poppler"
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING "poppler 23.09.0"
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME "poppler"
++
++/* Define to the home page for this package. */
++#define PACKAGE_URL ""
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION "23.09.0"
++
++/* Poppler data dir */
++#define POPPLER_DATADIR "/usr/local/share/poppler"
++
++/* Support for curl based doc builder is compiled in. */
++/* #undef POPPLER_HAS_CURL_SUPPORT */
++
++/* Enable word list support. */
++#define TEXTOUT_WORD_LIST 1
++
++/* Defines if use cms */
++/* #undef USE_CMS */
++
++/* Use single precision arithmetic in the Splash backend */
++/* #undef USE_FLOAT */
++
++/* Version number of package */
++#define VERSION "23.09.0"
++
++#if defined(__APPLE__)
++#elif defined (_WIN32)
++/* Use win32 font configuration backend */
++#define WITH_FONTCONFIGURATION_WIN32 1
++#elif defined (__ANDROID__)
++/* Use android font configuration backend */
++#define WITH_FONTCONFIGURATION_ANDROID 1
++#else
++/* Use fontconfig font configuration backend */
++#define WITH_FONTCONFIGURATION_FONTCONFIG 1
++#endif
++
++/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */
++/* #undef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG */
++
++/* MS defined snprintf as deprecated but then added it in Visual Studio 2015. */
++#if defined(_MSC_VER) && _MSC_VER < 1900
++#define snprintf _snprintf
++#endif
++
++//------------------------------------------------------------------------
++// popen
++//------------------------------------------------------------------------
++#if defined(_MSC_VER) || defined(__BORLANDC__)
++#define popen _popen
++#define pclose _pclose
++#define strncasecmp _strnicmp
++#define strcasecmp _stricmp
++#endif
++
++/* Number of bits in a file offset, on hosts where this is settable. */
++/* #undef _FILE_OFFSET_BITS */
++
++/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
++/* TODO This is wrong, port if needed #undef _LARGEFILE_SOURCE */
++
++/* Define for large files, on AIX-style hosts. */
++/* TODO This is wrong, port if needed #undef _LARGE_FILES */
+diff --git a/poppler/poppler-config.h b/poppler/poppler-config.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/poppler/poppler-config.h
+@@ -0,0 +1,156 @@
++//================================================= -*- mode: c++ -*- ====
++//
++// poppler-config.h
++//
++// Copyright 1996-2011, 2022 Glyph & Cog, LLC
++//
++//========================================================================
++
++//========================================================================
++//
++// Modified under the Poppler project - http://poppler.freedesktop.org
++//
++// All changes made under the Poppler project to this file are licensed
++// under GPL version 2 or later
++//
++// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
++// Copyright (C) 2014 Hib Eris <hib@hiberis.nl>
++// Copyright (C) 2016 Tor Lillqvist <tml@collabora.com>
++// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
++// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
++// Copyright (C) 2018 Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
++// Copyright (C) 2020 Albert Astals Cid <aacid@kde.org>
++//
++// To see a description of the changes please see the Changelog file that
++// came with your tarball or type make ChangeLog if you are building from git
++//
++//========================================================================
++
++#ifndef POPPLER_CONFIG_H
++#define POPPLER_CONFIG_H
++
++// We duplicate some of the config.h #define's here since they are
++// used in some of the header files we install. The #ifndef/#endif
++// around #undef look odd, but it's to silence warnings about
++// redefining those symbols.
++
++/* Defines the poppler version. */
++#ifndef POPPLER_VERSION
++#define POPPLER_VERSION "23.09.0"
++#endif
++
++/* Use single precision arithmetic in the Splash backend */
++#ifndef USE_FLOAT
++/* #undef USE_FLOAT */
++#endif
++
++/* Include support for OPI comments. */
++#ifndef OPI_SUPPORT
++#define OPI_SUPPORT 1
++#endif
++
++/* Enable word list support. */
++#ifndef TEXTOUT_WORD_LIST
++#define TEXTOUT_WORD_LIST 1
++#endif
++
++/* Support for curl is compiled in. */
++#ifndef POPPLER_HAS_CURL_SUPPORT
++/* #undef POPPLER_HAS_CURL_SUPPORT */
++#endif
++
++/* Use libjpeg instead of builtin jpeg decoder. */
++#ifndef ENABLE_LIBJPEG
++#define ENABLE_LIBJPEG 1
++#endif
++
++/* Build against libtiff. */
++#ifndef ENABLE_LIBTIFF
++/* #define ENABLE_LIBTIFF 1 */
++#endif
++
++/* Build against libpng. */
++#ifndef ENABLE_LIBPNG
++/* #define ENABLE_LIBPNG 1 */
++#endif
++
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_DIRENT_H
++#if !defined(_WIN32)
++#define HAVE_DIRENT_H 1
++#endif
++#endif
++
++/* Defines if gettimeofday is available on your system */
++#ifndef HAVE_GETTIMEOFDAY
++#if !defined(_WIN32)
++#define HAVE_GETTIMEOFDAY 1
++#endif
++#endif
++
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++#ifndef HAVE_NDIR_H
++/* #undef HAVE_NDIR_H */
++#endif
++
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_SYS_DIR_H
++#if !defined(__APPLE__) && !defined(_WIN32)
++#define HAVE_SYS_DIR_H 1
++#endif
++#endif
++
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_SYS_NDIR_H
++/* #undef HAVE_SYS_NDIR_H */
++#endif
++
++/* Defines if use cms */
++#ifndef USE_CMS
++/* #undef USE_CMS */
++#endif
++
++/* Use header-only classes from Boost in the Splash backend */
++#ifndef USE_BOOST_HEADERS
++/* #undef USE_BOOST_HEADERS */
++#endif
++
++//------------------------------------------------------------------------
++// version
++//------------------------------------------------------------------------
++
++// copyright notice
++#define popplerCopyright "Copyright 2005-2023 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
++
++//------------------------------------------------------------------------
++// Win32 stuff
++//------------------------------------------------------------------------
++
++#if defined(_WIN32) && !defined(_MSC_VER)
++#include <windef.h>
++#else
++#define CDECL
++#endif
++
++//------------------------------------------------------------------------
++// Compiler
++//------------------------------------------------------------------------
++
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
++#include <cstdio> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h
++#ifdef __MINGW_PRINTF_FORMAT
++#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
++ __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
++#else
++#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
++ __attribute__((__format__(__printf__, fmt_index, va_index)))
++#endif
++#else
++#define GCC_PRINTF_FORMAT(fmt_index, va_index)
++#endif
++
++#endif /* POPPLER_CONFIG_H */
+diff --git a/cpp/poppler-version.h b/cpp/poppler-version.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/cpp/poppler-version.h
+@@ -0,0 +1,39 @@
++/*
++ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef POPPLER_VERSION_H
++#define POPPLER_VERSION_H
++
++#include "poppler-global.h"
++
++#define POPPLER_VERSION "23.09.0"
++#define POPPLER_VERSION_MAJOR 23
++#define POPPLER_VERSION_MINOR 9
++#define POPPLER_VERSION_MICRO 0
++
++namespace poppler
++{
++
++POPPLER_CPP_EXPORT std::string version_string();
++POPPLER_CPP_EXPORT unsigned int version_major();
++POPPLER_CPP_EXPORT unsigned int version_minor();
++POPPLER_CPP_EXPORT unsigned int version_micro();
++
++}
++
++#endif
+diff --git a/poppler_private_export.h b/poppler_private_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/poppler_private_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_PRIVATE_EXPORT_H
++#define POPPLER_PRIVATE_EXPORT_H
++
++# define POPPLER_PRIVATE_EXPORT
++# define POPPLER_PRIVATE_NO_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED
++# define POPPLER_PRIVATE_DEPRECATED_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_PRIVATE_EXPORT_H */
+
+diff --git a/cpp/poppler_cpp_export.h b/cpp/poppler_cpp_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/cpp/poppler_cpp_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_CPP_EXPORT_H
++#define POPPLER_CPP_EXPORT_H
++
++# define POPPLER_CPP_EXPORT
++# define POPPLER_CPP_NO_EXPORT
++# define POPPLER_CPP_DEPRECATED
++# define POPPLER_CPP_DEPRECATED_EXPORT
++# define POPPLER_CPP_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_CPP_EXPORT_H */
diff --git a/external/poppler/sanitizer.patch b/external/poppler/sanitizer.patch
new file mode 100644
index 0000000000..c08e1b4e8a
--- /dev/null
+++ b/external/poppler/sanitizer.patch
@@ -0,0 +1,18 @@
+--- poppler/PSOutputDev.cc
++++ poppler/PSOutputDev.cc
+@@ -3138,6 +3138,8 @@
+ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, int rotateA, bool useMediaBox, bool crop, int sliceX, int sliceY, int sliceW, int sliceH, bool printing, bool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData, bool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), void *annotDisplayDecideCbkData)
+ {
++ std::abort();
++#if 0
+ PreScanOutputDev *scan;
+ bool rasterize;
+ bool useFlate, useLZW;
+@@ -3623,5 +3625,6 @@
+
+ return false;
++#endif
+ }
+
+ void PSOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA)