Stores page setup information

Methods and Functions

gtkPageSetupNew() gtkPageSetupCopy(object) gtkPageSetupGetOrientation(object) gtkPageSetupSetOrientation(object, orientation) gtkPageSetupGetPaperSize(object) gtkPageSetupSetPaperSize(object, size) gtkPageSetupGetTopMargin(object, unit) gtkPageSetupSetTopMargin(object, margin, unit) gtkPageSetupGetBottomMargin(object, unit) gtkPageSetupSetBottomMargin(object, margin, unit) gtkPageSetupGetLeftMargin(object, unit) gtkPageSetupSetLeftMargin(object, margin, unit) gtkPageSetupGetRightMargin(object, unit) gtkPageSetupSetRightMargin(object, margin, unit) gtkPageSetupSetPaperSizeAndDefaultMargins(object, size) gtkPageSetupGetPaperWidth(object, unit) gtkPageSetupGetPaperHeight(object, unit) gtkPageSetupGetPageWidth(object, unit) gtkPageSetupGetPageHeight(object, unit) gtkPageSetupNewFromFile(, .errwarn = TRUE) gtkPageSetupNewFromKeyFile(key.file,, .errwarn = TRUE) gtkPageSetupLoadFile(object,, .errwarn = TRUE) gtkPageSetupLoadKeyFile(object, key.file,, .errwarn = TRUE) gtkPageSetupToFile(object,, .errwarn = TRUE) gtkPageSetupToKeyFile(object, key.file, gtkPageSetup()



Detailed Description

A GtkPageSetup 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 GtkPrintOperation when printing. The benefit of splitting this out of the GtkPrintSettings is that these affect the actual layout of the page, and thus need to be set long before user prints. 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. To obtain a GtkPageSetup use gtkPageSetupNew to get the defaults, or use gtkPrintRunPageSetupDialog to show the page setup dialog and receive the resulting page setup. A page setup dialog

do_page_setup <- function()
  if (is.null(settings))
    settings <- gtkPrintSettings() new_page_setup <- gtkPrintRunPageSetupDialog(main_window, page_setup,
                                               settings) page_setup <- new_page_setup
Printing support was added in GTK+ 2.10.


Convenient Construction

gtkPageSetup is the equivalent of gtkPageSetupNew.


  • GtkPageSetup
  • gtkPageSetup
Documentation reproduced from package RGtk2, version 2.20.31, License: GPL

Community examples

Looks like there are no examples yet.