File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
layout/src/main/java/com/itextpdf/layout/renderer Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -196,9 +196,19 @@ public LayoutResult layout(LayoutContext layoutContext) {
196
196
// indicates whether the placement is forced
197
197
boolean isPlacingForced = false ;
198
198
if (width > layoutBox .getWidth () + EPS || height > layoutBox .getHeight () + EPS ) {
199
- if (Boolean .TRUE .equals (getPropertyAsBoolean (Property .FORCED_PLACEMENT )) || ( width > layoutBox . getWidth () && processOverflowX ) || ( height > layoutBox . getHeight () && processOverflowY ) ) {
199
+ if (Boolean .TRUE .equals (getPropertyAsBoolean (Property .FORCED_PLACEMENT ))) {
200
200
isPlacingForced = true ;
201
201
} else {
202
+ isPlacingForced = true ;
203
+ if (width > layoutBox .getWidth () + EPS ) {
204
+ isPlacingForced &= processOverflowX ;
205
+ }
206
+ if (height > layoutBox .getHeight () + EPS ) {
207
+ isPlacingForced &= processOverflowY ;
208
+ }
209
+ }
210
+
211
+ if (!isPlacingForced ) {
202
212
applyMargins (initialOccupiedAreaBBox , true );
203
213
applyBorderBox (initialOccupiedAreaBBox , true );
204
214
occupiedArea .getBBox ().setHeight (initialOccupiedAreaBBox .getHeight ());
You can’t perform that action at this time.
0 commit comments