aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-group-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r--widgets/table/e-table-group-container.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 72f2323acd..cf8aae1aff 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1191,7 +1191,9 @@ e_table_group_container_print_page (EPrintable *ep,
ETGCPrintContext *groupcontext)
{
cairo_t *cr;
+ GtkPageSetup *setup;
gdouble yd;
+ gdouble page_height, page_margin;
gdouble child_height;
ETableGroupContainerChildNode *child_node;
GList *child;
@@ -1202,7 +1204,10 @@ e_table_group_container_print_page (EPrintable *ep,
child_printable = groupcontext->child_printable;
child = groupcontext->child;
- yd = 6.5 * 72;
+ setup = gtk_print_context_get_page_setup (context);
+ page_height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
+ page_margin = gtk_page_setup_get_bottom_margin (setup, GTK_UNIT_POINTS) + gtk_page_setup_get_top_margin (setup, GTK_UNIT_POINTS);
+ yd = page_height - page_margin;
if (child_printable) {
if (child)
@@ -1266,7 +1271,7 @@ e_table_group_container_print_page (EPrintable *ep,
cairo_rectangle (cr, 0, 0, width - 2 * TEXT_AREA_HEIGHT,child_height);
cairo_clip(cr);
- e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, 0, quantize);
+ e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, height , quantize);
yd += child_height + TEXT_AREA_HEIGHT;
if (e_printable_data_left(child_printable))