Skip to content

Commit 198db91

Browse files
committed
adjust paper size to be A4 in cm
1 parent 20194f8 commit 198db91

File tree

1 file changed

+8
-0
lines changed
  • visokio-omniprint/visokio_omniprint

1 file changed

+8
-0
lines changed

visokio-omniprint/visokio_omniprint/Pdf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ def create_pdf(self, url, timeout, is_docker):
1212

1313
print_options = PrintOptions()
1414
print_options.orientation = "portrait"
15+
print_options.margin_left = 0
16+
print_options.margin_right = 0
17+
print_options.margin_top = 0
18+
print_options.margin_bottom = 0
19+
20+
# A4 in cm
21+
print_options.page_width = 21.0
22+
print_options.page_height = 29.7
1523

1624
result = driver.print_page(print_options)
1725
driver.get("about:blank") # Navigate away to ensure page is unloaded properly.

0 commit comments

Comments
 (0)