File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
layout/src/main/java/com/itextpdf/layout/renderer Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ public void drawBackground(DrawContext drawContext) {
492
492
Rectangle backgroundArea = applyMargins (bBox , false );
493
493
if (backgroundArea .getWidth () <= 0 || backgroundArea .getHeight () <= 0 ) {
494
494
Logger logger = LoggerFactory .getLogger (AbstractRenderer .class );
495
- logger .error (MessageFormatUtil .format (LogMessageConstant .RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background" ));
495
+ logger .warn (MessageFormatUtil .format (LogMessageConstant .RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background" ));
496
496
return ;
497
497
}
498
498
boolean backgroundAreaIsClipped = false ;
@@ -517,7 +517,7 @@ public void drawBackground(DrawContext drawContext) {
517
517
backgroundImage .getImage ().getWidth (), backgroundImage .getImage ().getHeight ());
518
518
if (imageRectangle .getWidth () <= 0 || imageRectangle .getHeight () <= 0 ) {
519
519
Logger logger = LoggerFactory .getLogger (AbstractRenderer .class );
520
- logger .error (MessageFormatUtil .format (LogMessageConstant .RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background-image" ));
520
+ logger .warn (MessageFormatUtil .format (LogMessageConstant .RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background-image" ));
521
521
return ;
522
522
}
523
523
applyBorderBox (backgroundArea , true );
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public ImageRenderer(Image image) {
106
106
public LayoutResult layout (LayoutContext layoutContext ) {
107
107
LayoutArea area = layoutContext .getArea ().clone ();
108
108
Rectangle layoutBox = area .getBBox ().clone ();
109
- Float retrievedWidth = retrieveWidth (layoutBox .getWidth ());
109
+ Float retrievedWidth = hasProperty ( Property . WIDTH ) ? retrieveWidth (layoutBox .getWidth ()) : null ;
110
110
111
111
List <Rectangle > floatRendererAreas = layoutContext .getFloatRendererAreas ();
112
112
float clearHeightCorrection = FloatingHelper .calculateClearHeightCorrection (this , floatRendererAreas , layoutBox );
You can’t perform that action at this time.
0 commit comments