cairo: Allow xr_driver_create()'s caller to usefully set more options.
[pspp-builds.git] / src / ui / gui / psppire-output-window.c
index 02d4b2543fdb5f7025528a11d76c9f6f68a4f3af..b079cf1d4ce8c1cc358cbef64eb74901383e323c 100644 (file)
@@ -237,6 +237,18 @@ psppire_output_submit (struct output_driver *this,
       g_free (font_name);
       pango_font_description_free (font_desc);
 
+      /* Pretend that the "page" has a reasonable width and a very big length,
+         so that most tables can be conveniently viewed on-screen with vertical
+         scrolling only.  (The length should not be increased very much because
+         it is already close enough to INT_MAX when expressed as thousands of a
+         point.) */
+      string_map_insert (&options, "paper-size", "300x200000mm");
+      string_map_insert (&options, "headers", "off");
+      string_map_insert (&options, "left-margin", "0");
+      string_map_insert (&options, "right-margin", "0");
+      string_map_insert (&options, "top-margin", "0");
+      string_map_insert (&options, "bottom-margin", "0");
+
       pod->xr = xr_driver_create (cr, &options);
 
       string_map_destroy (&options);