pdfium: update to 8073

Patches:
- external/pdfium/extractpatterns-fill.patch.1 is now upstream
- external/pdfium/extractpatterns-stroke.patch.1 as well
- external/pdfium/fix-windows-build.patch.1 as well
- external/pdfium/system-icu.patch.1 as well
- external/pdfium/system-dragonbox.diff is a new dependency, patch the
  code to use our bundled dragonbox
- update external/pdfium/system-abseil.diff to apply again

Adapted tests:
- CppunitTest_vcl_pdfexport goes back to its previous expected values
  after pdfium.git commit 17cf94b52e01507108da6460ebca6b48995a698e
  (Revert "Fix mixed-direction line extraction", 2026-09-17)
- CppunitTest_vcl_pdfexport2 as well

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I09bf5fc9f54b697eed2e144c3f57c3b72f3bbc37
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13508
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 0272de3a9b98d0c3ef4479e0dc12abe8cc040447)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211551
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna
2026-09-30 08:42:24 +02:00
committed by Xisco Fauli
parent 70e6dd0eb1
commit fe590de0fe
13 changed files with 91 additions and 570 deletions
+2 -2
View File
@@ -539,8 +539,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts
PDFIUM_SHA256SUM := 0340b2fca57cecdf6e2e0366129a3340f6764c132cb090f57db96d9f0f349855
PDFIUM_TARBALL := pdfium-7988.tar.bz2
PDFIUM_SHA256SUM := a3624f6f0ac46a7e190969d405aa7a07dbc342baf69f81192487575bf64055a5
PDFIUM_TARBALL := pdfium-8073.tar.bz2
# three static lines
# so that git cherry-pick
# will not run into conflicts
+14 -1
View File
@@ -66,6 +66,10 @@ $(eval $(call gb_Library_add_defs,pdfium,\
-DUSE_SYSTEM_FAST_FLOAT \
))
endif
# Always define: our pdfium tarball doesn't ship third_party/dragonbox/src/ itself.
$(eval $(call gb_Library_add_defs,pdfium,\
-DUSE_SYSTEM_DRAGONBOX \
))
$(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
@@ -299,7 +303,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_table \
UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_stringarchivestream \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_occontext \
UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_contentstream_write_utils \
UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_font_util \
UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_fontsubsetter \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_annotcontext \
@@ -389,6 +392,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_segment \
UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_symbol_dict \
UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_trd_proc \
UnpackedTarball/pdfium/core/fxcodec/image_predictors \
UnpackedTarball/pdfium/core/fxcodec/jpeg/libjpeg_scanline_decoder \
))
$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
@@ -453,6 +458,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_container_stream \
UnpackedTarball/pdfium/core/fxcrt/bytestring_pool \
UnpackedTarball/pdfium/core/fxcrt/cfx_bidi_resolver \
UnpackedTarball/pdfium/core/fxcrt/stream_write_utils \
))
ifneq ($(OS),WNT)
@@ -586,6 +592,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
))
endif
ifneq ($(SYSTEM_ABSEIL),TRUE)
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/third_party/abseil-cpp/absl/base/throw_delegate \
))
endif
$(eval $(call gb_Library_use_externals,pdfium,\
libjpeg \
lcms2 \
@@ -593,6 +605,7 @@ $(eval $(call gb_Library_use_externals,pdfium,\
icu_headers \
icuuc \
harfbuzz \
dragonbox \
))
ifneq (,$(filter LINUX ANDROID,$(OS)))
+3 -9
View File
@@ -21,10 +21,7 @@ pdfium_patches += charcodetoglyphindex.patch.1
pdfium_patches += getfontdictobjnum.patch.1
pdfium_patches += system-fast_float.diff
# https://pdfium-review.googlesource.com/c/pdfium/+/154490
pdfium_patches += system-icu.patch.1
# https://pdfium-review.googlesource.com/c/pdfium/+/154690
pdfium_patches += fix-windows-build.patch.1
pdfium_patches += system-dragonbox.diff
ifeq ($(OS),WNT)
pdfium_patches += pdfium-vs2019-arm64_no-__umulh.patch.1
@@ -32,10 +29,6 @@ endif
# TODO, attempt upstream
pdfium_patches += ofz451333752.patch
# https://pdfium-review.googlesource.com/c/pdfium/+/154910
pdfium_patches += extractpatterns-stroke.patch.1
# https://pdfium-review.googlesource.com/c/pdfium/+/157490
pdfium_patches += extractpatterns-fill.patch.1
pdfium_patches += charbboxinflation.patch.1
# Hide bundled FreeType symbols
pdfium_patches += freetype-hidden-visibility.patch
@@ -57,7 +50,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \
mv core/fxcrt/debug/alias.cc core/fxcrt/debug/alias.cpp && \
mv core/fxcrt/win/win_util.cc core/fxcrt/win/win_util.cpp && \
mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp \
mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \
mv third_party/abseil-cpp/absl/base/throw_delegate.cc third_party/abseil-cpp/absl/base/throw_delegate.cpp \
))
# vim: set noet sw=4 ts=4:
+4 -4
View File
@@ -18,7 +18,7 @@ diff -ru pdfium.orig/core/fxge/cfx_face.cpp pdfium/core/fxge/cfx_face.cpp
int FTPosToCBoxInt(FT_Pos pos) {
// Boundary values to avoid integer overflow when multiplied by 1000.
static constexpr FT_Pos kMinCBox = -2147483;
@@ -1289,11 +1289,6 @@
@@ -1209,11 +1209,6 @@
int err = LoadGlyph(glyph_index, /*scale=*/false);
if (err == 0) {
rect = GetGlyphBBox(glyph_index);
@@ -27,6 +27,6 @@ diff -ru pdfium.orig/core/fxge/cfx_face.cpp pdfium/core/fxge/cfx_face.cpp
- } else {
- rect.top = std::numeric_limits<int>::max();
- }
#if defined(PDF_ENABLE_SKIA_TYPEFACE_CHECKS)
#if defined(PDF_ENABLE_FONTATIONS)
if (skrifa_font_ && skrifa_font_->font->is_ok()) {
}
}
return rect;
-179
View File
@@ -1,179 +0,0 @@
From 3e9b2c24c3c35c17ad887f6b415e04163d97ae3c Mon Sep 17 00:00:00 2001
Date: Thu, 17 Sep 2026 15:52:06 -0700
Subject: [PATCH] Add FPDFPageObj_GetRenderedFillPattern() API
This is similar to http://pdfium-review.googlesource.com/c/154910, but
that one was for stroke patterns and this is for fill patterns.
Change-Id: I9929e232472fdd974009c64bcb1109d69a813d0a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/157490
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
---
fpdfsdk/fpdf_edit_embeddertest.cpp | 64 ++++++++++++++
fpdfsdk/fpdf_editpage.cpp | 79 +++++++++++-------
fpdfsdk/fpdf_view_c_api_test.c | 1 +
public/fpdf_edit.h | 16 ++++
.../resources/embedder_tests/pattern_fill.png | Bin 0 -> 107 bytes
.../embedder_tests/pattern_fill_uncolored.png | Bin 0 -> 107 bytes
testing/resources/pattern_fill.in | 56 +++++++++++++
testing/resources/pattern_fill.pdf | 68 +++++++++++++++
testing/resources/pattern_fill_uncolored.in | 58 +++++++++++++
testing/resources/pattern_fill_uncolored.pdf | 70 ++++++++++++++++
10 files changed, 384 insertions(+), 28 deletions(-)
create mode 100644 testing/resources/embedder_tests/pattern_fill.png
create mode 100644 testing/resources/embedder_tests/pattern_fill_uncolored.png
create mode 100644 testing/resources/pattern_fill.in
create mode 100644 testing/resources/pattern_fill.pdf
create mode 100644 testing/resources/pattern_fill_uncolored.in
create mode 100644 testing/resources/pattern_fill_uncolored.pdf
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 9b9474ed7..033572048 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -199,7 +199,8 @@ ByteString FormatPDFDate(time_t current_time, const tm& local_time) {
FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern,
CPDF_Document* doc,
- CPDF_PageObject* page_obj) {
+ CPDF_PageObject* page_obj,
+ bool use_stroke_color) {
CPDF_TilingPattern* tiling_pattern = pattern->AsTilingPattern();
if (!tiling_pattern) {
return nullptr;
@@ -228,10 +229,13 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern,
return FPDFBitmapFromCFXDIBitmap(cell_bitmap.Leak());
}
- // An uncolored pattern gets its color from the stroke color operands.
- const FX_COLORREF stroke_colorref =
- page_obj->color_state().GetStrokeColorRef();
- if (stroke_colorref == 0xFFFFFFFF) {
+ // An uncolored pattern gets its color from the stroke/fill color operands.
+ const CPDF_ColorState& color_state = page_obj->color_state();
+ const FX_COLORREF colorref =
+ use_stroke_color ? color_state.GetStrokeColorRef()
+ : color_state.GetFillColorRef();
+ // 0xFFFFFFFF is the unusable color, see FX_COLORREF.
+ if (colorref == 0xFFFFFFFF) {
return nullptr;
}
@@ -240,11 +244,14 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern,
FXDIB_Format::kBgra)) {
return nullptr;
}
- const int stroke_alpha =
- static_cast<int>(page_obj->general_state().GetStrokeAlpha() * 255);
+ const CPDF_GeneralState& general_state = page_obj->general_state();
+ const float float_alpha = use_stroke_color
+ ? general_state.GetStrokeAlpha()
+ : general_state.GetFillAlpha();
+ const int alpha = static_cast<int>(float_alpha * 255);
if (!result_bitmap->CompositeMask(
/*dest_left=*/0, /*dest_top=*/0, rect.Width(), rect.Height(),
- cell_bitmap, AlphaAndColorRefToArgb(stroke_alpha, stroke_colorref),
+ cell_bitmap, AlphaAndColorRefToArgb(alpha, colorref),
/*src_left=*/0, /*src_top=*/0, BlendMode::kNormal)) {
return nullptr;
}
@@ -255,6 +262,36 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern,
return FPDFBitmapFromCFXDIBitmap(result_bitmap.Leak());
}
+FPDF_BITMAP GetRenderedPattern(FPDF_DOCUMENT document,
+ FPDF_PAGEOBJECT page_object,
+ bool use_stroke_color) {
+ CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document);
+ if (!doc) {
+ return nullptr;
+ }
+
+ CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object);
+ if (!object) {
+ return nullptr;
+ }
+
+ const CPDF_ColorState& color_state = object->color_state();
+ const CPDF_Color* color = use_stroke_color
+ ? color_state.GetStrokeColor()
+ : color_state.GetFillColor();
+ if (!color || !color->IsPattern()) {
+ return nullptr;
+ }
+
+ RetainPtr<CPDF_Pattern> pattern = color->GetPattern();
+ if (!pattern) {
+ return nullptr;
+ }
+
+ return RenderTilingPatternToBitmap(pattern.Get(), doc, object,
+ use_stroke_color);
+}
+
} // namespace
FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
@@ -1261,27 +1298,13 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object,
FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document,
FPDF_PAGEOBJECT page_object) {
- CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document);
- if (!doc) {
- return nullptr;
- }
-
- CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object);
- if (!object) {
- return nullptr;
- }
-
- const CPDF_Color* stroke = object->color_state().GetStrokeColor();
- if (!stroke || !stroke->IsPattern()) {
- return nullptr;
- }
-
- RetainPtr<CPDF_Pattern> pattern = stroke->GetPattern();
- if (!pattern) {
- return nullptr;
- }
+ return GetRenderedPattern(document, page_object, /*use_stroke_color=*/true);
+}
- return RenderTilingPatternToBitmap(pattern.Get(), doc, object);
+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
+FPDFPageObj_GetRenderedFillPattern(FPDF_DOCUMENT document,
+ FPDF_PAGEOBJECT page_object) {
+ return GetRenderedPattern(document, page_object, /*use_stroke_color=*/false);
}
FPDF_EXPORT int FPDF_CALLCONV
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index c7fca05a1..77fa19c81 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -1206,6 +1206,22 @@ FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document,
FPDF_PAGEOBJECT page_object);
+// Experimental API.
+// Get a bitmap rasterization of the fill pattern of |page_object|.
+// To render correctly, the caller must provide the |document| associated with
+// |page_object|. The returned bitmap will be owned by the caller, and
+// FPDFBitmap_Destroy() must be called on the returned bitmap when it is no
+// longer needed.
+//
+// document - handle to the document containing |page_object|.
+// page_object - handle to a page object.
+//
+// Returns the bitmap, or NULL if the fill is not a tiling pattern or on
+// failure.
+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
+FPDFPageObj_GetRenderedFillPattern(FPDF_DOCUMENT document,
+ FPDF_PAGEOBJECT page_object);
+
// Get number of segments inside |path|.
//
// path - handle to a path.
-262
View File
@@ -1,262 +0,0 @@
From 7bf42f401237d9096d44f7508beca8690031a98d Mon Sep 17 00:00:00 2001
Date: Tue, 8 Sep 2026 16:54:21 -0700
Subject: [PATCH] Add FPDFPageObj_GetRenderedStrokePattern() API
This allows getting the rendered bitmap of a stroke pattern of a page
object.
Change-Id: I4603be175bfe8721d4e11500afcc2be8c2c9f760
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154910
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
---
core/fpdfapi/render/cpdf_rendertiling.cpp | 21 +++--
core/fpdfapi/render/cpdf_rendertiling.h | 14 +++
fpdfsdk/fpdf_edit_embeddertest.cpp | 64 +++++++++++++
fpdfsdk/fpdf_editpage.cpp | 88 ++++++++++++++++++
fpdfsdk/fpdf_view_c_api_test.c | 1 +
public/fpdf_edit.h | 16 ++++
.../embedder_tests/pattern_stroke.png | Bin 0 -> 86 bytes
.../pattern_stroke_uncolored.png | Bin 0 -> 86 bytes
testing/resources/pattern_stroke.in | 59 ++++++++++++
testing/resources/pattern_stroke.pdf | 71 ++++++++++++++
testing/resources/pattern_stroke_uncolored.in | 61 ++++++++++++
.../resources/pattern_stroke_uncolored.pdf | 73 +++++++++++++++
12 files changed, 458 insertions(+), 10 deletions(-)
create mode 100644 testing/resources/embedder_tests/pattern_stroke.png
create mode 100644 testing/resources/embedder_tests/pattern_stroke_uncolored.png
create mode 100644 testing/resources/pattern_stroke.in
create mode 100644 testing/resources/pattern_stroke.pdf
create mode 100644 testing/resources/pattern_stroke_uncolored.in
create mode 100644 testing/resources/pattern_stroke_uncolored.pdf
diff --git a/core/fpdfapi/render/cpdf_rendertiling.cpp b/core/fpdfapi/render/cpdf_rendertiling.cpp
index f407f2403..77027354b 100644
--- a/core/fpdfapi/render/cpdf_rendertiling.cpp
+++ b/core/fpdfapi/render/cpdf_rendertiling.cpp
@@ -26,7 +26,17 @@
namespace {
-RetainPtr<CFX_DIBitmap> DrawPatternBitmap(
+std::optional<int> CheckedFloatToInt(float value) {
+ if (!pdfium::IsValueInRangeForNumericType<int>(value)) {
+ return std::nullopt;
+ }
+ return static_cast<int>(value);
+}
+
+} // namespace
+
+// static
+RetainPtr<CFX_DIBitmap> CPDF_RenderTiling::DrawPatternBitmap(
CPDF_Document* doc,
CPDF_PageImageCache* pCache,
CPDF_TilingPattern* pPattern,
@@ -72,15 +82,6 @@ RetainPtr<CFX_DIBitmap> DrawPatternBitmap(
return pBitmap;
}
-std::optional<int> CheckedFloatToInt(float value) {
- if (!pdfium::IsValueInRangeForNumericType<int>(value)) {
- return std::nullopt;
- }
- return static_cast<int>(value);
-}
-
-} // namespace
-
// static
RetainPtr<CFX_DIBitmap> CPDF_RenderTiling::Draw(
CPDF_RenderStatus* pRenderStatus,
diff --git a/core/fpdfapi/render/cpdf_rendertiling.h b/core/fpdfapi/render/cpdf_rendertiling.h
index 34fb56bf4..2a124461c 100644
--- a/core/fpdfapi/render/cpdf_rendertiling.h
+++ b/core/fpdfapi/render/cpdf_rendertiling.h
@@ -7,11 +7,14 @@
#ifndef CORE_FPDFAPI_RENDER_CPDF_RENDERTILING_H_
#define CORE_FPDFAPI_RENDER_CPDF_RENDERTILING_H_
+#include "core/fpdfapi/render/cpdf_renderoptions.h"
#include "core/fxcrt/retain_ptr.h"
class CFX_DIBitmap;
class CFX_Matrix;
+class CPDF_Document;
class CPDF_Form;
+class CPDF_PageImageCache;
class CPDF_PageObject;
class CPDF_RenderStatus;
class CPDF_TilingPattern;
@@ -27,6 +30,17 @@ class CPDF_RenderTiling {
const FX_RECT& clip_box,
bool bStroke);
+ // Renders a single cell of pPattern into a width x height bitmap.
+ static RetainPtr<CFX_DIBitmap> DrawPatternBitmap(
+ CPDF_Document* doc,
+ CPDF_PageImageCache* pCache,
+ CPDF_TilingPattern* pPattern,
+ CPDF_Form* pPatternForm,
+ const CFX_Matrix& mtObject2Device,
+ int width,
+ int height,
+ const CPDF_RenderOptions::Options& draw_options);
+
CPDF_RenderTiling() = delete;
CPDF_RenderTiling(const CPDF_RenderTiling&) = delete;
CPDF_RenderTiling& operator=(const CPDF_RenderTiling&) = delete;
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 758aae859..9b9474ed7 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -25,12 +25,15 @@
#include "core/fpdfapi/page/cpdf_pathobject.h"
#include "core/fpdfapi/page/cpdf_shadingobject.h"
#include "core/fpdfapi/page/cpdf_textobject.h"
+#include "core/fpdfapi/page/cpdf_tilingpattern.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfapi/render/cpdf_docrenderdata.h"
+#include "core/fpdfapi/render/cpdf_renderoptions.h"
+#include "core/fpdfapi/render/cpdf_rendertiling.h"
#include "core/fpdfdoc/cpdf_annot.h"
#include "core/fpdfdoc/cpdf_annotlist.h"
#include "core/fxcrt/compiler_specific.h"
@@ -42,6 +45,7 @@
#include "core/fxcrt/span_util.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxcrt/unowned_ptr.h"
+#include "core/fxge/dib/cfx_dibitmap.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#include "public/fpdf_formfill.h"
@@ -193,6 +197,64 @@ ByteString FormatPDFDate(time_t current_time, const tm& local_time) {
return date;
}
+FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern,
+ CPDF_Document* doc,
+ CPDF_PageObject* page_obj) {
+ CPDF_TilingPattern* tiling_pattern = pattern->AsTilingPattern();
+ if (!tiling_pattern) {
+ return nullptr;
+ }
+ const std::unique_ptr<CPDF_Form> pattern_form =
+ tiling_pattern->Load(page_obj);
+ if (!pattern_form) {
+ return nullptr;
+ }
+ const FX_RECT rect = tiling_pattern->bbox().GetOuterRect();
+ if (rect.IsEmpty() || !rect.Valid()) {
+ return nullptr;
+ }
+
+ RetainPtr<CFX_DIBitmap> cell_bitmap = CPDF_RenderTiling::DrawPatternBitmap(
+ doc, /*pCache=*/nullptr, tiling_pattern, pattern_form.get(), CFX_Matrix(),
+ rect.Width(), rect.Height(), CPDF_RenderOptions::Options());
+ if (!cell_bitmap) {
+ return nullptr;
+ }
+
+ if (tiling_pattern->colored()) {
+ ValidateBitmapPremultiplyState(cell_bitmap);
+
+ // Caller takes ownership.
+ return FPDFBitmapFromCFXDIBitmap(cell_bitmap.Leak());
+ }
+
+ // An uncolored pattern gets its color from the stroke color operands.
+ const FX_COLORREF stroke_colorref =
+ page_obj->color_state().GetStrokeColorRef();
+ if (stroke_colorref == 0xFFFFFFFF) {
+ return nullptr;
+ }
+
+ auto result_bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
+ if (!result_bitmap->Create(rect.Width(), rect.Height(),
+ FXDIB_Format::kBgra)) {
+ return nullptr;
+ }
+ const int stroke_alpha =
+ static_cast<int>(page_obj->general_state().GetStrokeAlpha() * 255);
+ if (!result_bitmap->CompositeMask(
+ /*dest_left=*/0, /*dest_top=*/0, rect.Width(), rect.Height(),
+ cell_bitmap, AlphaAndColorRefToArgb(stroke_alpha, stroke_colorref),
+ /*src_left=*/0, /*src_top=*/0, BlendMode::kNormal)) {
+ return nullptr;
+ }
+
+ ValidateBitmapPremultiplyState(result_bitmap);
+
+ // Caller takes ownership.
+ return FPDFBitmapFromCFXDIBitmap(result_bitmap.Leak());
+}
+
} // namespace
FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
@@ -1196,6 +1258,32 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object,
return true;
}
+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
+FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document,
+ FPDF_PAGEOBJECT page_object) {
+ CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document);
+ if (!doc) {
+ return nullptr;
+ }
+
+ CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object);
+ if (!object) {
+ return nullptr;
+ }
+
+ const CPDF_Color* stroke = object->color_state().GetStrokeColor();
+ if (!stroke || !stroke->IsPattern()) {
+ return nullptr;
+ }
+
+ RetainPtr<CPDF_Pattern> pattern = stroke->GetPattern();
+ if (!pattern) {
+ return nullptr;
+ }
+
+ return RenderTilingPatternToBitmap(pattern.Get(), doc, object);
+}
+
FPDF_EXPORT int FPDF_CALLCONV
FPDFFormObj_CountObjects(FPDF_PAGEOBJECT form_object) {
const auto* pObjectList = CPDFPageObjHolderFromFPDFFormObject(form_object);
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 8fac863f6..34be3867d 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -1190,6 +1190,22 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object,
size_t dash_count,
float phase);
+// Experimental API.
+// Get a bitmap rasterization of the stroke pattern of |page_object|.
+// To render correctly, the caller must provide the |document| associated with
+// |page_object|. The returned bitmap will be owned by the caller, and
+// FPDFBitmap_Destroy() must be called on the returned bitmap when it is no
+// longer needed.
+//
+// document - handle to the document containing |page_object|.
+// page_object - handle to a page object.
+//
+// Returns the bitmap, or NULL if the stroke is not a tiling pattern or on
+// failure.
+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
+FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document,
+ FPDF_PAGEOBJECT page_object);
+
// Get number of segments inside |path|.
//
// path - handle to a path.
-44
View File
@@ -1,44 +0,0 @@
From 3abda657c073f89dc6b39bbad8f7dfe2fbf17fd4 Mon Sep 17 00:00:00 2001
Date: Mon, 10 Aug 2026 11:59:46 -0700
Subject: [PATCH] fxge: fix missing windows include in cfx_renderdevice.h
This resulted in a build failure here:
In file included from .../pdfium/core/fxge/cfx_drawutils.cpp:13:
.../core/fxge/cfx_renderdevice.h(74,7): error: unknown type name 'HDC'
74 | HDC hdc,
| ^
It seems this started after commit
fc790866bf26d977b2ea3a0c3938bb52895309ea (Consolidate CFX_RenderDevice
and remove CPDF_WindowsRenderDevice, 2026-06-29): the Windows-DC code
was moved from cpdf_windowsrenderdevice.h to cfx_renderdevice.h but the
windows.h include wasn't moved.
Given that it looks like every other pdfium header that uses HDC
includes <windows.h> directly (core/fxge/win32/cpsoutput.h etc.), just
add the missing include here as well, conditionally.
Change-Id: Ie9920b2031148f7781862502905d999ce045b014
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154690
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
---
core/fxge/cfx_renderdevice.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h
index 8f427ce01..4114b9884 100644
--- a/core/fxge/cfx_renderdevice.h
+++ b/core/fxge/cfx_renderdevice.h
@@ -19,6 +19,10 @@
#include "core/fxge/dib/fx_dib.h"
#include "core/fxge/renderdevicedriver_iface.h"
+#if BUILDFLAG(IS_WIN)
+#include <windows.h>
+#endif
+
class CFX_DIBBase;
class CFX_DIBitmap;
class CFX_Font;
+7 -6
View File
@@ -13,7 +13,7 @@
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 2026-08-03 16:22:37 using:
Generated on 2026-09-24 17:32:45 using:
./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -32,9 +32,6 @@
#include <algorithm>
#include <array>
#include <bit>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
@@ -94,7 +91,6 @@
#include <core/fpdfapi/cmaps/Japan1/cmaps_japan1.h>
#include <core/fpdfapi/cmaps/Korea1/cmaps_korea1.h>
#include <core/fpdfapi/cmaps/fpdf_cmaps.h>
#include <core/fpdfapi/edit/cpdf_contentstream_write_utils.h>
#include <core/fpdfapi/edit/cpdf_creator.h>
#include <core/fpdfapi/edit/cpdf_font_util.h>
#include <core/fpdfapi/edit/cpdf_fontsubsetter.h>
@@ -245,6 +241,7 @@
#include <core/fpdfdoc/cpdf_structtree.h>
#include <core/fpdfdoc/cpdf_viewerpreferences.h>
#include <core/fpdfdoc/cpvt_fontmap.h>
#include <core/fpdfdoc/cpvt_line.h>
#include <core/fpdfdoc/cpvt_section.h>
#include <core/fpdfdoc/cpvt_variabletext.h>
#include <core/fpdfdoc/cpvt_word.h>
@@ -263,6 +260,7 @@
#include <core/fxcodec/gif/cfx_gif.h>
#include <core/fxcodec/gif/lzw_decompressor.h>
#include <core/fxcodec/icc/icc_transform.h>
#include <core/fxcodec/image_predictors.h>
#include <core/fxcodec/jbig2/jbig2_arith_decoder.h>
#include <core/fxcodec/jbig2/jbig2_arith_int_decoder.h>
#include <core/fxcodec/jbig2/jbig2_bit_stream.h>
@@ -284,6 +282,7 @@
#include <core/fxcodec/jbig2/jbig2_trd_proc.h>
#include <core/fxcodec/jpeg/jpeg_common.h>
#include <core/fxcodec/jpeg/jpegmodule.h>
#include <core/fxcodec/jpeg/libjpeg_scanline_decoder.h>
#include <core/fxcodec/jpx/cjpx_decoder.h>
#include <core/fxcodec/jpx/jpx_decode_utils.h>
#include <core/fxcodec/scanlinedecoder.h>
@@ -335,6 +334,8 @@
#include <core/fxcrt/fixed_size_data_vector.h>
#include <core/fxcrt/fx_2d_size.h>
#include <core/fxcrt/fx_bidi.h>
#include <core/fxcrt/fx_ceil_div.h>
#include <core/fxcrt/fx_ceil_log2.h>
#include <core/fxcrt/fx_codepage.h>
#include <core/fxcrt/fx_coordinates.h>
#include <core/fxcrt/fx_extension.h>
@@ -366,6 +367,7 @@
#include <core/fxcrt/span_io.h>
#include <core/fxcrt/span_util.h>
#include <core/fxcrt/stl_util.h>
#include <core/fxcrt/stream_write_utils.h>
#include <core/fxcrt/string_data_template.h>
#include <core/fxcrt/string_template.h>
#include <core/fxcrt/to_underlying.h>
@@ -490,7 +492,6 @@
#include <public/fpdf_text.h>
#include <public/fpdf_transformpage.h>
#include <public/fpdfview.h>
#include <third_party/abseil-cpp/absl/cleanup/cleanup.h>
#include <third_party/agg23/agg_clip_liang_barsky.h>
#include <third_party/agg23/agg_conv_dash.h>
#include <third_party/agg23/agg_conv_stroke.h>
+28 -12
View File
@@ -1,22 +1,22 @@
--- core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:10.955659091 +0100
+++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:43.420136476 +0100
@@ -17,8 +17,11 @@
#include "core/fxcrt/compiler_specific.h"
diff -urN before/core/fpdfapi/page/cpdf_sampledfunc.cpp after/core/fpdfapi/page/cpdf_sampledfunc.cpp
--- core/fpdfapi/page/cpdf_sampledfunc.cpp 2026-09-24 15:11:27.153556875 +0000
+++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2026-09-24 15:11:41.206965278 +0000
@@ -18,7 +18,11 @@
#include "core/fxcrt/fx_ceil_div.h"
#include "core/fxcrt/fx_memory_wrappers.h"
#include "core/fxcrt/fx_safe_types.h"
+#ifdef USE_SYSTEM_ABSEIL
+#include <absl/container/inlined_vector.h>
+#else
#include "third_party/abseil-cpp/absl/container/inlined_vector.h"
-
+#endif
namespace {
// See PDF Reference 1.7, page 170, table 3.36.
diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nametree.cpp
--- core/fpdfdoc/cpdf_nametree.cpp 2025-10-13 21:48:18.759905514 +0200
+++ core/fpdfdoc/cpdf_nametree.cpp 2025-10-13 22:00:01.912909396 +0200
@@ -18,7 +18,11 @@
diff -urN before/core/fpdfdoc/cpdf_nametree.cpp after/core/fpdfdoc/cpdf_nametree.cpp
--- core/fpdfdoc/cpdf_nametree.cpp 2026-09-24 15:11:27.137556410 +0000
+++ core/fpdfdoc/cpdf_nametree.cpp 2026-09-24 15:11:41.169964202 +0000
@@ -19,7 +19,11 @@
#include "core/fxcrt/check.h"
#include "core/fxcrt/ptr_util.h"
#include "core/fxcrt/stl_util.h"
@@ -28,8 +28,9 @@ diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nam
namespace {
--- core/fpdfdoc/cpvt_variabletext.cpp~ 2026-08-01 01:50:23.000000000 +0200
+++ core/fpdfdoc/cpvt_variabletext.cpp 2026-08-26 10:04:23.478434445 +0200
diff -urN before/core/fpdfdoc/cpvt_variabletext.cpp after/core/fpdfdoc/cpvt_variabletext.cpp
--- core/fpdfdoc/cpvt_variabletext.cpp 2026-09-24 15:11:27.145556642 +0000
+++ core/fpdfdoc/cpvt_variabletext.cpp 2026-09-24 15:11:41.189964784 +0000
@@ -21,7 +21,11 @@
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/span.h"
@@ -42,3 +43,18 @@ diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nam
namespace {
diff -urN before/core/fxge/cfx_face.cpp after/core/fxge/cfx_face.cpp
--- core/fxge/cfx_face.cpp 2026-09-24 15:11:27.161557107 +0000
+++ core/fxge/cfx_face.cpp 2026-09-24 15:11:41.224965801 +0000
@@ -46,7 +46,11 @@
#if defined(PDF_ENABLE_FONTATIONS)
#include "core/fxge/skrifa/src/main.rs.h"
+#ifdef USE_SYSTEM_ABSEIL
+#include <absl/cleanup/cleanup.h>
+#else
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
+#endif
#include "third_party/rust/cxx/v1/cxx.h"
#endif
+15
View File
@@ -0,0 +1,15 @@
diff -urN db_before/core/fxcrt/stream_write_utils.cpp db_after/core/fxcrt/stream_write_utils.cpp
--- core/fxcrt/stream_write_utils.cpp 2026-09-24 15:17:47.881621130 +0000
+++ core/fxcrt/stream_write_utils.cpp 2026-09-24 15:17:47.911622002 +0000
@@ -10,7 +10,11 @@
#include <ostream>
#include "core/fxcrt/span.h"
+#ifdef USE_SYSTEM_DRAGONBOX
+#include <dragonbox/dragonbox.h>
+#else
#include "third_party/dragonbox/src/include/dragonbox/dragonbox.h"
+#endif
namespace {
-33
View File
@@ -1,33 +0,0 @@
From 9b6f23989c5da39bff4ce36df96d62f9cabeebbf Mon Sep 17 00:00:00 2001
Date: Fri, 7 Aug 2026 14:36:14 -0700
Subject: [PATCH] fxcrt: fix building against system ICU in cfx_bidi_resolver
This was the only location which forgot to check for this define,
core/fxcrt/fx_extension.h:18 already did the same.
Change-Id: I6efdd8c5a3322b146f9ccabcabd2ac2506912d85
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154490
Commit-Queue: Andy Phan <andyphan@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Andy Phan <andyphan@chromium.org>
---
core/fxcrt/cfx_bidi_resolver.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/fxcrt/cfx_bidi_resolver.cpp b/core/fxcrt/cfx_bidi_resolver.cpp
index 50e302e35..efa585f38 100644
--- a/core/fxcrt/cfx_bidi_resolver.cpp
+++ b/core/fxcrt/cfx_bidi_resolver.cpp
@@ -10,7 +10,12 @@
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/ptr_util.h"
+
+#if defined(USE_SYSTEM_ICUUC)
+#include <unicode/ubidi.h>
+#else
#include "third_party/icu/source/common/unicode/ubidi.h"
+#endif
void CFX_BidiResolver::UBiDiDeleter::operator()(UBiDi* bidi) const {
ubidi_close(bidi);
+3 -3
View File
@@ -1526,7 +1526,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2a)
for (int i = 0; i < nChars; i++)
aChars[i] = pPdfTextPage->getUnicode(i);
OUString aActualText(aChars.data(), aChars.size());
CPPUNIT_ASSERT_EQUAL(u"\u0627\u0644 \u0648\u0642\u0641 \u0628\u0627\u0644 \u0627\u0644"_ustr,
CPPUNIT_ASSERT_EQUAL(u"\u0627\u0644 \u0628\u0627\u0644 \u0648\u0642\u0641 \u0627\u0644"_ustr,
aActualText);
#endif
}
@@ -1559,7 +1559,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf154549)
// Without the fix in place, this test would have failed with
// - Expected: ִبي
// - Actual : بִي
CPPUNIT_ASSERT_EQUAL(u"\u0628\u064A\u05B4"_ustr, aActualText);
CPPUNIT_ASSERT_EQUAL(u"\u05B4\u0628\u064A"_ustr, aActualText);
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf150846)
@@ -1621,7 +1621,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf160401)
// אאא בבב
// - Actual : אאא בבב
// בבב אאא
CPPUNIT_ASSERT_EQUAL(u"בבב אאא\r\nבבב אאא"_ustr, aActualText);
CPPUNIT_ASSERT_EQUAL(u"אאא בבב\r\nאאא בבב"_ustr, aActualText);
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf103492)
+15 -15
View File
@@ -1691,7 +1691,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf139627)
int rehmim = 0, kasreh = 1, jehtatweel = 2;
CPPUNIT_ASSERT_EQUAL(u"رم"_ustr, sText[rehmim].trim());
CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\xD8\xAC\xD9\x90"), sText[kasreh].trim());
CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\xD9\x90\xD8\xAC"), sText[kasreh].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, sText[jehtatweel].trim());
// "Kasreh" should be within "jeh" character
@@ -2536,9 +2536,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf134226)
CPPUNIT_ASSERT_EQUAL(u"ة"_ustr, aText[0].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[1].trim());
CPPUNIT_ASSERT_EQUAL(u"ق\r\n\u0651"_ustr, aText[2].trim());
CPPUNIT_ASSERT_EQUAL(u"\u0651ق"_ustr, aText[2].trim());
CPPUNIT_ASSERT_EQUAL(u"ش"_ustr, aText[3].trim());
CPPUNIT_ASSERT_EQUAL(u"ق\u0651"_ustr, aText[4].trim());
CPPUNIT_ASSERT_EQUAL(u"\u0651ق"_ustr, aText[4].trim());
CPPUNIT_ASSERT_EQUAL(u"ش"_ustr, aText[5].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[6].trim());
CPPUNIT_ASSERT_EQUAL(u"ة"_ustr, aText[7].trim());
@@ -2570,13 +2570,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf71956)
CPPUNIT_ASSERT_EQUAL(size_t(12), aText.size());
CPPUNIT_ASSERT_EQUAL(u"ه"_ustr, aText[0].trim());
CPPUNIT_ASSERT_EQUAL(u"ل\r\n\u064e\u0651\u0670"_ustr, aText[1].trim());
CPPUNIT_ASSERT_EQUAL(u"\u064e\u0651\u0670ل"_ustr, aText[1].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[2].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[3].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[4].trim());
CPPUNIT_ASSERT_EQUAL(u"ل"_ustr, aText[5].trim());
CPPUNIT_ASSERT_EQUAL(u"ل"_ustr, aText[6].trim());
CPPUNIT_ASSERT_EQUAL(u"ل\u064e\u0651\u0670"_ustr, aText[7].trim());
CPPUNIT_ASSERT_EQUAL(u"\u064e\u0651\u0670ل"_ustr, aText[7].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[8].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[9].trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[10].trim());
@@ -2884,19 +2884,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf151748KashidaSpace)
CPPUNIT_ASSERT_EQUAL(size_t(17), aText.size());
// Box 1: Not enough room for kashida
CPPUNIT_ASSERT_EQUAL(u"تخوردگی خط"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u"خط تخوردگی"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(1).trim());
// Box 2: One kashida toward end
CPPUNIT_ASSERT_EQUAL(u"وردگی"_ustr, aText.at(2).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); // Kashida
CPPUNIT_ASSERT_EQUAL(u"تخ خط"_ustr, aText.at(4).trim());
CPPUNIT_ASSERT_EQUAL(u"خط تخ"_ustr, aText.at(4).trim());
CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(5).trim());
// Box 3: Two kashida
CPPUNIT_ASSERT_EQUAL(u"وردگی"_ustr, aText.at(6).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(7).trim()); // Kashida
CPPUNIT_ASSERT_EQUAL(u"تخ ط"_ustr, aText.at(8).trim());
CPPUNIT_ASSERT_EQUAL(u"ط تخ"_ustr, aText.at(8).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(9).trim()); // Kashida
CPPUNIT_ASSERT_EQUAL(u"خ"_ustr, aText.at(10).trim());
CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(11).trim());
@@ -2924,7 +2924,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105SwKashidaSpaceExpansion)
CPPUNIT_ASSERT_EQUAL(u"یده"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim());
CPPUNIT_ASSERT_EQUAL(u"کش ه"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u"ه کش"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim());
CPPUNIT_ASSERT_EQUAL(u"نویس"_ustr, aText.at(4).trim());
@@ -2949,7 +2949,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105Writer)
CPPUNIT_ASSERT_EQUAL(u"ارسی"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim());
CPPUNIT_ASSERT_EQUAL(u"ف تن"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u"تن ف"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim());
CPPUNIT_ASSERT_EQUAL(u"م"_ustr, aText.at(4).trim());
@@ -2974,7 +2974,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105Editeng)
CPPUNIT_ASSERT_EQUAL(u"ارسی"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim());
CPPUNIT_ASSERT_EQUAL(u"ف تن"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u"تن ف"_ustr, aText.at(2).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim());
CPPUNIT_ASSERT_EQUAL(u"م"_ustr, aText.at(4).trim());
@@ -2994,16 +2994,16 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf140767SyriacJustification)
CPPUNIT_ASSERT_EQUAL(size_t(11), aText.size());
CPPUNIT_ASSERT_EQUAL(u"ܝ"_ustr, aText.at(0).trim());
CPPUNIT_ASSERT_EQUAL(u"ܛܺ"_ustr, aText.at(1).trim());
CPPUNIT_ASSERT_EQUAL(u"ܺܛ"_ustr, aText.at(1).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(2).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim());
CPPUNIT_ASSERT_EQUAL(u"ܚܰ"_ustr, aText.at(4).trim());
CPPUNIT_ASSERT_EQUAL(u"ܰܚ"_ustr, aText.at(4).trim());
CPPUNIT_ASSERT_EQUAL(u"ܕ"_ustr, aText.at(5).trim()); // This span is whitespace justified
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(6).trim());
CPPUNIT_ASSERT_EQUAL(u"ܓܰ"_ustr, aText.at(7).trim());
CPPUNIT_ASSERT_EQUAL(u"ܰܓ"_ustr, aText.at(7).trim());
CPPUNIT_ASSERT_EQUAL(u"ܒ"_ustr, aText.at(8).trim());
CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(9).trim());
CPPUNIT_ASSERT_EQUAL(u"ܐܰ"_ustr, aText.at(10).trim());
CPPUNIT_ASSERT_EQUAL(u"ܰܐ"_ustr, aText.at(10).trim());
// Without kashida justification, this space will be 224.328
CPPUNIT_ASSERT_LESS(90.0, aRect.at(5).getWidth());