class KPrinter

#### PyKDE - Python Bindings for KDE

# class KPrinter |
Table of contents
Modules
kdeprint Classes
All Classes

Module | kdeprint
Class | KPrinter
Inherits | QPaintDevice, KPReloadObject

### enums

- ApplicationType = {Dialog = 0, StandAlone = 1, StandAlonePersistent = 2 }
- CollateType = {Collate = 0, Uncollate = 1 }
- ColorMode = {GrayScale = QPrinter .GrayScale , Color = QPrinter .Color }
- Orientation = {Portrait = QPrinter .Portrait , Landscape = QPrinter .Landscape }
- PageOrder = {FirstPageFirst = QPrinter .FirstPageFirst , LastPageFirst = QPrinter .LastPageFirst }
- PageSelectionType = {ApplicationSide = 1, SystemSide = 2 }
- PageSetType = {AllPages = 0, OddPages = 1, EvenPages = 2 }
- PageSize = {A4 = QPrinter .A4 , B5 = QPrinter .B5 , Letter = QPrinter .Letter , Legal = QPrinter .Legal , Executive = QPrinter .Executive , A0 = QPrinter .A0 , A1 = QPrinter .A1 , A2 = QPrinter .A2 , A3 = QPrinter .A3 , A5 = QPrinter .A5 , A6 = QPrinter .A6 , A7 = QPrinter .A7 , A8 = QPrinter .A8 , A9 = QPrinter .A9 , B0 = QPrinter .B0 , B1 = QPrinter .B1 , B10 = QPrinter .B10 , B2 = QPrinter .B2 , B3 = QPrinter .B3 , B4 = QPrinter .B4 , B6 = QPrinter .B6 , B7 = QPrinter .B7 , B8 = QPrinter .B8 , B9 = QPrinter .B9 , C5E = QPrinter .C5E , Comm10E = QPrinter .Comm10E , DLE = QPrinter .DLE , Folio = QPrinter .Folio , Ledger = QPrinter .Ledger , Tabloid = QPrinter .Tabloid , NPageSize = QPrinter .NPageSize }
- StandardPageType = {CopiesPage = 1, FilesPage = 2, Custom = 16 }

### methods

- KPrinter (restore = 1, m = QPrinter .ScreenResolution)

  returns a KPrinter instance
  Argument | Type | Default
  --- | --- | ---
  restore | bool | 1
  m | QPrinter.PrinterMode | QPrinter .ScreenResolution

- abort ()

  returns (bool)

- aborted ()

  returns (bool)

- addDialogPage (_page)

  returns nothing
  static
  Argument | Type | Default
  --- | --- | ---
  _page | KPrintDialogPage |

- addStandardPage (p)

  returns nothing
  static
  Argument | Type | Default
  --- | --- | ---
  p | int |

- applicationType ()

  returns (KPrinter.ApplicationType)
  static

- autoConfigure (prname = QString .null, parent = 0)

  returns (bool)
  Argument | Type | Default
  --- | --- | ---
  prname | QString | QString .null
  parent | QWidget | 0

- cmd (a0, a1, a2)

  Not Implemented

- collate ()

  returns (KPrinter.CollateType)

- colorMode ()

  returns (KPrinter.ColorMode)

- creator ()

  returns (QString)

- currentPage ()

  returns (int)

- doPreview (file)

  returns (bool)
  In versions KDE 3.1.0 and above only
  Argument | Type | Default
  --- | --- | ---
  file | QString |

- docDirectory ()

  returns (QString)
  In versions KDE 3.1.0 and above only

- docFileName ()

  returns (QString)

- docName ()

  returns (QString)

- errorMessage ()

  returns (QString)

- finishPrinting ()

  returns nothing

- fromPage ()

  returns (int)

- fullPage ()

  returns (bool)

- implementation ()

  Not Implemented

- init (restore = 1, m = QPrinter .ScreenResolution)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  restore | bool | 1
  m | QPrinter.PrinterMode | QPrinter .ScreenResolution

- initOptions (opts)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  opts | QMap |

- loadSettings ()

  returns nothing

- margins ()

  returns (QSize)

- margins ()

  returns top (uint) left (uint) bottom (uint) right (uint)
  In versions KDE 3.1.0 and above only

- maxPage ()

  returns (int)

- metric (a0)

  returns (int)
  Argument | Type | Default
  --- | --- | ---
  a0 | int |

- minPage ()

  returns (int)

- newPage ()

  returns (bool)

- numCopies ()

  returns (int)

- option (key)

  returns (QString)
  Argument | Type | Default
  --- | --- | ---
  key | QString |

- options ()

  returns (QMap)

- orientation ()

  returns (KPrinter.Orientation)

- outputFileName ()

  returns (QString)

- outputToFile ()

  returns (bool)

- pageList ()

  returns (QValueList)

- pageOrder ()

  returns (KPrinter.PageOrder)

- pageSelection ()

  returns (KPrinter.PageSelectionType)
  static

- pageSet ()

  returns (KPrinter.PageSetType)

- pageSize ()

  returns (KPrinter.PageSize)

- preparePrinting ()

  returns nothing

- previewOnly ()

  returns (bool)

- printFiles (files, removeafter = 0, startviewer = 1)

  returns (bool)
  Argument | Type | Default
  --- | --- | ---
  files | QStringList |
  removeafter | bool | 0
  startviewer | bool | 1

- printProgram ()

  returns (QString)

- printerName ()

  returns (QString)

- printerSelectionOption ()

  returns (QString)

- realDrawableArea ()

  returns (QRect)
  In versions KDE 3.1.0 and above only

- realPageSize ()

  returns (QSize)

- reload ()

  returns nothing

- removeStandardPage (p)

  returns nothing
  static
  Argument | Type | Default
  --- | --- | ---
  p | int |

- resolution ()

  returns (int)
  In versions KDE 3.1.0 and above only

- saveSettings ()

  returns nothing

- searchName ()

  returns (QString)

- setApplicationType (type)

  returns nothing
  static
  Argument | Type | Default
  --- | --- | ---
  type | KPrinter.ApplicationType |

- setCollate (type)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  type | KPrinter.CollateType |

- setColorMode (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | KPrinter.ColorMode |

- setCreator (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- setCurrentPage (p = 0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  p | int | 0

- setDocDirectory (dir)

  returns nothing
  In versions KDE 3.1.0 and above only
  Argument | Type | Default
  --- | --- | ---
  dir | QString |

- setDocFileName (filename)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  filename | QString |

- setDocName (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- setErrorMessage (msg)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  msg | QString |

- setFromTo (a0, a1)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | int |
  a1 | int |

- setFullPage (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | bool |

- setMargins (m)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  m | QSize |

- setMargins (top, left, bottom, right)

  returns nothing
  In versions KDE 3.2.0 and above only
  Argument | Type | Default
  --- | --- | ---
  top | uint |
  left | uint |
  bottom | uint |
  right | uint |

- setMinMax (a0, a1)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | int |
  a1 | int |

- setNumCopies (n)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  n | int |

- setOption (key, value)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  key | QString |
  value | QString |

- setOption (key, value, broadcast)

  returns nothing
  In versions KDE 3.2.0 and above only
  Argument | Type | Default
  --- | --- | ---
  key | QString |
  value | QString |
  broadcast | bool |

- setOptions (opts)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  opts | QMap |

- setOrientation (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | KPrinter.Orientation |

- setOutputFileName (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- setOutputToFile (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | bool |

- setPageOrder (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | KPrinter.PageOrder |

- setPageSelection (_mode)

  returns nothing
  static
  Argument | Type | Default
  --- | --- | ---
  _mode | KPrinter.PageSelectionType |

- setPageSize (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | KPrinter.PageSize |

- setPreviewOnly (on)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  on | bool |

- setPrintProgram (cmd)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  cmd | QString |

- setPrinterName (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- setPrinterSelectionOption (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

- setRealDrawableArea (r)

  returns nothing
  In versions KDE 3.1.0 and above only
  Argument | Type | Default
  --- | --- | ---
  r | QRect |

- setRealPageSize (p)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  p | QSize |

- setRealPageSize (p)

  returns nothing
  In versions KDE 3.2.0 and above only
  Argument | Type | Default
  --- | --- | ---
  p | DrPageSize |

- setResolution (dpi)

  returns nothing
  In versions KDE 3.1.0 and above only
  Argument | Type | Default
  --- | --- | ---
  dpi | int |

- setSearchName (n)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  n | QString |

- setUsePrinterResolution (on)

  returns nothing
  In versions KDE 3.2.0 and above only
  Argument | Type | Default
  --- | --- | ---
  on | bool |

- setup (parent = 0, caption = QString .null, forceExpand = 0)

  returns (bool)
  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  caption | QString | QString .null
  forceExpand | bool | 0

- toPage ()

  returns (int)

- translateQtOptions ()

  returns nothing