diff --git a/src/plugins/docgen/GtkPrint.py b/src/plugins/docgen/GtkPrint.py index b59325a58..9acd34043 100644 --- a/src/plugins/docgen/GtkPrint.py +++ b/src/plugins/docgen/GtkPrint.py @@ -136,8 +136,12 @@ def paperstyle_to_pagesetup(paper_style): paper_size = gtk.PaperSize(gramps_to_gtk[gramps_paper_name]) log.debug("Selected paper size: %s" % gramps_to_gtk[gramps_paper_name]) else: - paper_width = gramps_paper_size.get_width() * 10 - paper_height = gramps_paper_size.get_height() * 10 + if paper_style.get_orientation() == PAPER_PORTRAIT: + paper_width = gramps_paper_size.get_width() * 10 + paper_height = gramps_paper_size.get_height() * 10 + else: + paper_width = gramps_paper_size.get_height() * 10 + paper_height = gramps_paper_size.get_width() * 10 paper_size = gtk.paper_size_new_custom("custom", "Custom Size", paper_width, diff --git a/src/plugins/lib/libtreebase.py b/src/plugins/lib/libtreebase.py index 4ce3fbcef..800214e00 100644 --- a/src/plugins/lib/libtreebase.py +++ b/src/plugins/lib/libtreebase.py @@ -338,6 +338,7 @@ class Canvas(Page): #user wants PAGE to be the size of the report. size = self.doc.paper.get_size() + size.name = 'custom' max_width, max_height = \ self.canvas.get_report_height_width()