<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkpagesetup">

  <refnamediv>
    <refname>gtk.PageSetup</refname>
      <refpurpose>an object that stores page setup information (new in PyGTK
      2.10)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.PageSetup</classname></ooclass>
      <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkpagesetup">gtk.PageSetup</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--copy">copy</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-orientation">get_orientation</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-orientation">set_orientation</link></methodname>
        <methodparam><parameter role="keyword">orientation</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-paper-size">get_paper_size</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-paper-size">set_paper_size</link></methodname>
        <methodparam><parameter role="keyword">size</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-top-margin">get_top_margin</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-top-margin">set_top_margin</link></methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-bottom-margin">get_bottom_margin</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-bottom-margin">set_bottom_margin</link></methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-left-margin">get_left_margin</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-left-margin">set_left_margin</link></methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-right-margin">get_right_margin</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-right-margin">set_right_margin</link></methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--set-paper-size-and-default-margins">set_paper_size_and_default_margins</link></methodname>
        <methodparam><parameter role="keyword">size</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-paper-width">get_paper_width</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-paper-height">get_paper_height</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-page-width">get_page_width</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--get-page-height">get_page_height</link></methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--to-file">to_file</link></methodname>
        <methodparam><parameter role="keyword">file_name</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkpagesetup--load-file">load_file</link></methodname>
        <methodparam><parameter role="keyword">file_name</parameter></methodparam>
      </methodsynopsis>
</classsynopsis>

<programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
    <methodname><link linkend="function-gtk--print-run-page-setup-dialog">gtk.print_run_page_setup_dialog</link></methodname>
    <methodparam><parameter role="keyword">parent</parameter></methodparam>
    <methodparam><parameter role="keyword">page_setup</parameter></methodparam>
    <methodparam><parameter role="keyword">settings</parameter></methodparam>
  </methodsynopsis><methodsynopsis language="python">
    <methodname><link linkend="function-gtk--page-setup-new-from-file">gtk.page_setup_new_from_file</link></methodname>
    <methodparam><parameter role="keyword">file_name</parameter></methodparam>
  </methodsynopsis></programlisting>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkpagesetup">gtk.PageSetup</link>
</synopsis>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkpagesetup">
    <title>gtk.PageSetup Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <note>
      <para>This class is available in PyGTK 2.10 and above.</para>
    </note>

    <para>A <link
    linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>
    object stores the page size, orientation and margins. The idea is that
    you can get one of these from the page setup dialog and then pass it to
    the <link
    linkend="class-gtkprintoperation"><classname>gtk.PrintOperation</classname></link>
    when printing. The benefit of splitting this out of the <link
    linkend="class-gtkprintsettings"><classname>gtk.PrintSettings</classname></link>
    is that these affect the actual layout of the page, and thus need to be
    set long before user prints.</para>

    <para>The margins specified in this object are the "print margins",
    i.e. the parts of the page that the printer cannot print on. These are
    different from the layout margins that a word processor uses; they are
    typically used to determine the minimal size for the layout
    margins.</para>

    <para>To obtain a <link
    linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>
    use the <link
    linkend="constructor-gtkpagesetup">gtk.PageSetup()</link> constructor
    to get the defaults, or use the <link
    linkend="function-gtk--print-run-page-setup-dialog"><function>gtk.print_run_page_setup_dialog</function>()</link>
    function to show the page setup dialog and receive the resulting page
    setup. An example page setup function is:</para>

    <programlisting>
  def do_page_setup():
    if settings == None:
      settings = gtk.PrintSettings()

    page_setup = gtk.print_run_page_setup_dialog(main_window, page_setup,
                                                 settings)
    </programlisting>

  </refsect1>

  <refsect1>
    <title>Constructor</title>

    <refsect2 id="constructor-gtkpagesetup">
      <title>gtk.PageSetup</title>

      <programlisting><constructorsynopsis language="python">
        <methodname>gtk.PageSetup</methodname>
        <methodparam></methodparam>
      </constructorsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This constructor is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Creates a new <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkpagesetup--copy">
      <title>gtk.PageSetup.copy</title>

      <programlisting><methodsynopsis language="python">
        <methodname>copy</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a copy of this page setup</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>copy</methodname>() method copies this <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-orientation">
      <title>gtk.PageSetup.get_orientation</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_orientation</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the page orientation</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_orientation</methodname>() method returns
      the page orientation of the <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>. The
      return value must be one of the <xref
      linkend="gtk-page-orientation-constants"
      endterm="gtk-page-orientation-constants-title"></xref>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-orientation">
      <title>gtk.PageSetup.set_orientation</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_orientation</methodname>
        <methodparam><parameter role="keyword">orientation</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">orientation</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref
          linkend="gtk-page-orientation-constants"
          endterm="gtk-page-orientation-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_orientation</methodname>() method sets the
      page orientation of the <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>
      to the value specified by <parameter>orientation</parameter>. The
      value of <parameter>orientation</parameter> must be one of the <xref
      linkend="gtk-page-orientation-constants"
      endterm="gtk-page-orientation-constants-title"></xref></para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-paper-size">
      <title>gtk.PageSetup.get_paper_size</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_paper_size</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the paper size</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_paper_size</methodname>() method gets the
      paper size of the <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-paper-size">
      <title>gtk.PageSetup.set_paper_size</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_paper_size</methodname>
        <methodparam><parameter role="keyword">size</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">size</parameter>&nbsp;:</term>
          <listitem><simpara>a <link
          linkend="class-gtkpapersize"><classname>gtk.PaperSize</classname></link></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_paper_size</methodname>() method sets the
      paper size of the page setup without changing the margins. See the
      <link
      linkend="method-gtkpagesetup--set-paper-size-and-default-margins"><methodname>set_paper_size_and_default_margins</methodname>()</link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-top-margin">
      <title>gtk.PageSetup.get_top_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_top_margin</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value - one of the
          <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the top margin</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_top_margin</methodname>() method returns the
      top margin in units of <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-top-margin">
      <title>gtk.PageSetup.set_top_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_top_margin</methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">margin</parameter>&nbsp;:</term>
          <listitem><simpara>the new top margin in units of
          <parameter>unit</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the units for <parameter>margin</parameter> -
          one of the <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_top_margin</methodname>() method sets the
      top margin of the page setup to the value specified by
      <parameter>margin</parameter> in the units specified by
      <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-bottom-margin">
      <title>gtk.PageSetup.get_bottom_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_bottom_margin</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return
          value</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the bottom margin</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_bottom_margin</methodname>() method gets the
      bottom margin in units of <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-bottom-margin">
      <title>gtk.PageSetup.set_bottom_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_bottom_margin</methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">margin</parameter>&nbsp;:</term>
          <listitem><simpara>the new bottom margin in units of
          <parameter>unit</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the units for <parameter>margin</parameter> -
          one of the <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_bottom_margin</methodname>() method sets the
      bottom margin of the page setup to the value specified by
      <parameter>margin</parameter> using the units specified by
      <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-left-margin">
      <title>gtk.PageSetup.get_left_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_left_margin</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return
          value</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the left margin</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_left_margin</methodname>() method gets the
      left margin in units of <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-left-margin">
      <title>gtk.PageSetup.set_left_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_left_margin</methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">margin</parameter>&nbsp;:</term>
          <listitem><simpara>the new left margin in units of
          <parameter>unit</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the units for <parameter>margin</parameter> -
          one of the <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_left_margin</methodname>() method sets the
      left margin of the page setup to the value specified by
      <parameter>margin</parameter> using the units specified by
      <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-right-margin">
      <title>gtk.PageSetup.get_right_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_right_margin</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value</simpara> - one
          of the <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the right margin</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_right_margin</methodname>() method gets the
      right margin in units of <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-right-margin">
      <title>gtk.PageSetup.set_right_margin</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_right_margin</methodname>
        <methodparam><parameter role="keyword">margin</parameter></methodparam>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">margin</parameter>&nbsp;:</term>
          <listitem><simpara>the new right margin in units of
          <parameter>unit</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the units for <parameter>margin</parameter> -
          one of the <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>set_right_margin</methodname>() method sets the
      right margin of the page setup to the value specified by
      <parameter>margin</parameter> using the units specified by
      <parameter>unit</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--set-paper-size-and-default-margins">
      <title>gtk.PageSetup.set_paper_size_and_default_margins</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_paper_size_and_default_margins</methodname>
        <methodparam><parameter role="keyword">size</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">size</parameter>&nbsp;:</term>
          <listitem><simpara>a <link
          linkend="class-gtkpapersize"><classname>gtk.PaperSize</classname></link></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The
      <methodname>set_paper_size_and_default_margins</methodname>() method
      sets the paper size of the page setup to the value specified by
      <parameter>size</parameter> and modifies the margins according to the
      new paper size.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-paper-width">
      <title>gtk.PageSetup.get_paper_width</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_paper_width</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value - one of the
          <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the paper width.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_paper_width</methodname>() method returns
      the paper width in units of <parameter>unit</parameter>.</para>
      
      <para>Note that this function takes orientation, but not margins into
      consideration.  See the <link
      linkend="method-gtkpagesetup--get-page-width"><methodname>get_page_width()</methodname></link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-paper-height">
      <title>gtk.PageSetup.get_paper_height</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_paper_height</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value - one of the
          <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the paper height.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_paper_height</methodname>() method returns
      the paper height in units of <parameter>unit</parameter>.</para>
      
      <para>Note that this function takes orientation, but not margins into
      consideration.  See the <link
      linkend="method-gtkpagesetup--get-page-height"><methodname>get_page_height()</methodname></link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-page-width">
      <title>gtk.PageSetup.get_page_width</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_page_width</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value - one of the
          <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the page width.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_page_width</methodname>() method returns the
      page width in units of <parameter>unit</parameter>.</para>
      
      <para>Note that this function takes orientation and margins into
      consideration.  See the <link
      linkend="method-gtkpagesetup--get-paper-width"><methodname>get_paper_width()</methodname></link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--get-page-height">
      <title>gtk.PageSetup.get_page_height</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_page_height</methodname>
        <methodparam><parameter role="keyword">unit</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">unit</parameter>&nbsp;:</term>
          <listitem><simpara>the unit for the return value - one of the
          <xref linkend="gtk-unit-constants"
          endterm="gtk-unit-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the page height.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>The <methodname>get_page_height</methodname>() method returns
      the page height in units of <parameter>unit</parameter>.</para>
      
      <para>Note that this function takes orientation and margins into
      consideration.  See the <link
      linkend="method-gtkpagesetup--get-paper-height"><methodname>get_paper_height()</methodname></link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--to-file">
      <title>gtk.PageSetup.to_file</title>

      <programlisting><methodsynopsis language="python">
        <methodname>to_file</methodname>
        <methodparam><parameter role="keyword">file_name</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">file_name</parameter>&nbsp;:</term>
          <listitem><simpara>the file to save to</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>True on success.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.12 and above.</para>
      </note>

      <para>The <methodname>to_file</methodname>() method
      saves the information from setup to <parameter>file_name</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkpagesetup--laod-file">
      <title>gtk.PageSetup.load_file</title>

      <programlisting><methodsynopsis language="python">
        <methodname>load_file</methodname>
        <methodparam><parameter role="keyword">file_name</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">file_name</parameter>&nbsp;:</term>
          <listitem><simpara>the filename to read the page setup from.</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>True on success.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>
        The <methodname>load_file</methodname>() method
        Reads the page setup from the file file_name. See
        <methodname><link linkend="method-gtkpagesetup--to-file">to_file</link></methodname>.
      </para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-gtk--print-run-page-setup-dialog">
      <title>gtk.print_run_page_setup_dialog</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.print_run_page_setup_dialog</methodname>
	  <methodparam><parameter
			 role="keyword">parent</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">page_setup</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">settings</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">parent</parameter>&nbsp;:</term>
	  <listitem><simpara>transient parent, or
	  <literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">page_setup</parameter>&nbsp;:</term>
	  <listitem><simpara>an existing <link
	  linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>,
	  or <literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">settings</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gtkprintsettings"><classname>gtk.PrintSettings</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new <link
	  linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>Runs a page setup dialog, letting the user modify the values
      from page_setup. If the user cancels the dialog, the returned <link
      linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>
      is identical to the passed in page_setup, otherwise it contains the
      modifications done in the dialog.</para>

      <para>Note that this function may use a recursive mainloop to show the
      page setup dialog.</para>

    </refsect2>

    <refsect2 id="function-gtk--page-setup-new-from-file">
      <title>gtk.page_setup_new_from_file</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.page_setup_new_from_file</methodname>
	  <methodparam><parameter
			 role="keyword">file_name</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">file_name</parameter>&nbsp;:</term>
	  <listitem><simpara>the filename to read the page setup from.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>The restored <link
	  linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>
      
      <note>
        <para>This function is available in PyGTK 2.12 and above.</para>
      </note>
      
      <para>Reads the page setup from the file file_name. Returns a new
      <link linkend="class-gtkpagesetup"><classname>gtk.PageSetup</classname></link>
      object with the restored page setup, or None if an error occurred. See
      <link linkend="method-gtkpagesetup--to-file">gtk.PageSetup.to_file</link>.</para>

    </refsect2>

  </refsect1>

</refentry>
