Browse Source

Implementation fixes

Marcin Ziąbek 2 years ago
parent
commit
a6fe510cfd
2 changed files with 3 additions and 4 deletions
  1. 1 1
      Source/QuestPDF/Elements/Image.cs
  2. 2 3
      Source/QuestPDF/Elements/Page.cs

+ 1 - 1
Source/QuestPDF/Elements/Image.cs

@@ -17,7 +17,7 @@ namespace QuestPDF.Elements
         {
             return availableSpace.IsNegative() 
                 ? SpacePlan.Wrap() 
-                : SpacePlan.FullRender(availableSpace);
+                : SpacePlan.FullRender(Size.Zero);
         }
 
         internal override void Draw(Size availableSpace)

+ 2 - 3
Source/QuestPDF/Elements/Page.cs

@@ -19,7 +19,7 @@ namespace QuestPDF.Elements
         public float MarginTop { get; set; }
         public float MarginBottom { get; set; }
 
-        public string BackgroundColor { get; set; } = Colors.Transparent;
+        public string BackgroundColor { get; set; } = Colors.White;
         
         public Element Background { get; set; } = Empty.Instance;
         public Element Foreground { get; set; } = Empty.Instance;
@@ -33,6 +33,7 @@ namespace QuestPDF.Elements
             container
                 .ContentDirection(ContentDirection)
                 .Background(BackgroundColor)
+                .DefaultTextStyle(DefaultTextStyle)
                 .Layers(layers =>
                 {
                     layers
@@ -53,8 +54,6 @@ namespace QuestPDF.Elements
                         .PaddingTop(MarginTop)
                         .PaddingBottom(MarginBottom)
                 
-                        .DefaultTextStyle(DefaultTextStyle)
-                
                         .Decoration(decoration =>
                         {
                             decoration