Merge 170091013e15d57388a3062603e5e8250906b294 into a96553648551b94652f4b1139c440d53c806836f
This commit is contained in:
commit
24ea7df8a9
@ -1207,6 +1207,25 @@ class Caption extends XFAObject {
|
||||
return HTMLResult.EMPTY;
|
||||
}
|
||||
|
||||
// For checkButton captions, add a non-breaking space at the beginning
|
||||
// and replace all spaces with non-breaking spaces to prevent word wrapping
|
||||
const parent = this[$getParent]();
|
||||
if (
|
||||
parent?.ui?.checkButton &&
|
||||
typeof value === "object" &&
|
||||
value.children
|
||||
) {
|
||||
for (const child of value.children) {
|
||||
if (child.value && typeof child.value === "string") {
|
||||
// Replace all regular spaces with non-breaking spaces
|
||||
child.value = child.value.startsWith(" ")
|
||||
? child.value.replaceAll(" ", "\u00A0")
|
||||
: "\u00A0" + child.value.replaceAll(" ", "\u00A0");
|
||||
child.value = child.value.replaceAll("/", "\u2044");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const savedReserve = this.reserve;
|
||||
if (this.reserve <= 0) {
|
||||
const { w, h } = this[$getExtra](availableSpace);
|
||||
|
||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -93,6 +93,7 @@
|
||||
!issue8372.pdf
|
||||
!issue9713.pdf
|
||||
!xfa_filled_imm1344e.pdf
|
||||
!xfa_bug1716806.pdf
|
||||
!issue8424.pdf
|
||||
!issue8480.pdf
|
||||
!bug1650302_reduced.pdf
|
||||
|
||||
BIN
test/pdfs/xfa_bug1716806.pdf
Normal file
BIN
test/pdfs/xfa_bug1716806.pdf
Normal file
Binary file not shown.
@ -2128,6 +2128,14 @@
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "xfa_bug1716806",
|
||||
"file": "pdfs/xfa_bug1716806.pdf",
|
||||
"md5": "ed78b522c661e744f780ab9b6d09fd8d",
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "xfa_bug1716809",
|
||||
"file": "pdfs/xfa_bug1716809.pdf",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user