File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1207,6 +1207,25 @@ class Caption extends XFAObject {
12071207 return HTMLResult . EMPTY ;
12081208 }
12091209
1210+ // For checkButton captions, add a non-breaking space at the beginning
1211+ // and replace all spaces with non-breaking spaces to prevent word wrapping
1212+ const parent = this [ $getParent ] ( ) ;
1213+ if (
1214+ parent ?. ui ?. checkButton &&
1215+ typeof value === "object" &&
1216+ value . children
1217+ ) {
1218+ for ( const child of value . children ) {
1219+ if ( child . value && typeof child . value === "string" ) {
1220+ // Replace all regular spaces with non-breaking spaces
1221+ child . value = child . value . startsWith ( " " )
1222+ ? child . value . replaceAll ( " " , "\u00A0" )
1223+ : "\u00A0" + child . value . replaceAll ( " " , "\u00A0" ) ;
1224+ child . value = child . value . replaceAll ( "/" , "\u2044" ) ;
1225+ }
1226+ }
1227+ }
1228+
12101229 const savedReserve = this . reserve ;
12111230 if ( this . reserve <= 0 ) {
12121231 const { w, h } = this [ $getExtra ] ( availableSpace ) ;
Original file line number Diff line number Diff line change 9393! issue8372.pdf
9494! issue9713.pdf
9595! xfa_filled_imm1344e.pdf
96+ ! xfa_bug1716806.pdf
9697! issue8424.pdf
9798! issue8480.pdf
9899! bug1650302_reduced.pdf
Original file line number Diff line number Diff line change 21202120 "enableXfa" : true ,
21212121 "type" : " eq"
21222122 },
2123+ {
2124+ "id" : " xfa_bug1716806" ,
2125+ "file" : " pdfs/xfa_bug1716806.pdf" ,
2126+ "md5" : " ed78b522c661e744f780ab9b6d09fd8d" ,
2127+ "rounds" : 1 ,
2128+ "enableXfa" : true ,
2129+ "type" : " eq"
2130+ },
21232131 {
21242132 "id" : " xfa_bug1716809" ,
21252133 "file" : " pdfs/xfa_bug1716809.pdf" ,
You can’t perform that action at this time.
0 commit comments