summaryrefslogtreecommitdiffstats
path: root/printer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'printer.cpp')
-rw-r--r--printer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/printer.cpp b/printer.cpp
index 624de3a42..b4d937094 100644
--- a/printer.cpp
+++ b/printer.cpp
@@ -293,6 +293,8 @@ void Printer::previewOnePage()
pageSize.setHeight(paintDevice->height());
pageSize.setWidth(paintDevice->width());
webView->page()->setViewportSize(pageSize);
+ // initialize the border settings
+ templateOptions->border_width = std::max(1, pageSize.width() / 1000);
webView->setHtml(t.generate());
// render only one page