瀏覽代碼

Merge pull request #14 from trvrnrth/fix-margins

Fix top/bottom margin when not using dynamic header/footer
Jakob Truelsen 12 年之前
父節點
當前提交
9329a1a270
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/lib/pdfconverter.cc

+ 4 - 0
src/lib/pdfconverter.cc

@@ -208,6 +208,10 @@ void PdfConverterPrivate::beginConvert() {
         if (settings.margin.bottom.first == -1) {
         if (settings.margin.bottom.first == -1) {
             settings.margin.bottom.first = 10;
             settings.margin.bottom.first = 10;
         }
         }
+        
+        // set static header/footer reserve heights
+        o.headerReserveHeight = settings.margin.top.first;
+        o.footerReserveHeight = settings.margin.bottom.first;
 
 
         pageLoader.load();
         pageLoader.load();
     }
     }