소스 검색

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();
     }