瀏覽代碼

Static header/footer reserve heights fix

When not using dynamic header/footer via --header-html and
--footer-html we still need to set the reserve heights to the
static margin values provided.

I think this preserves the old margins/spacing behaviour.
Trevor North 12 年之前
父節點
當前提交
4f147ac20b
共有 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) {
             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();
     }