pycocoa.printers.Paper

Package pycocoa :: Module printers :: Class Paper |
[frames] | no frames]

# Class Paper

              object --+
                       |
    internals._Objectype --+
                           |
            baseTypes._Type0 --+
                               |
                       _PM_Type0 --+
                                   |
                                  Paper

Known Subclasses:
  - PaperCustom

Python `Paper` Type, wrapping an opaque ObjC `PMPaper`.

Note: Paper sizes are measured in points.

Instance Methods
__init__(self, name_pm) New Paper from a paper name (`str`) or `PMPaper`. |
localname(self, printer=None) Get the paper's localized name for a printer (`str`). |
Inherited from `_PM_Type0`: `__str__`, `release`, `retain` Inherited from `baseTypes._Type0`: `__repr__`, `type2strepr` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| height Get the paper height in points (`float`).
| ID Get the paper IDentifier (`str`).
| isCustom True if this is a custom paper (`bool`).
| margins Get the paper margins (PaperMargins).
| name Get the paper name (`str`).
| PPD Get the paper's PPD name (`URL`).
| printer Get the printer corresponding to this paper (`Printer`) or `None`.
| size2inch Get 2-tuple (width, height) in inch (`float`s).
| size2mm Get 2-tuple (width, height) in millimeter (`float`s).
| width Get the paper width in points (`float`).
Inherited from `_PM_Type0`: `PM` Inherited from `baseTypes._Type0`: `NS`, `NSDelegate` Inherited from `internals._Objectype`: `typename` Inherited from `object`: `__class__`

Method Details

### __init__(self, name_pm) (Constructor) |
New Paper from a paper name (`str`) or `PMPaper`. Raises: `PrintError` - No paper with name name_pm. `TypeError` - Invalid name_pm. Overrides: object.__init__

### localname(self, printer=None) |
Get the paper's localized name for a printer (`str`). Raises: `TypeError` - Invalid printer.

Property Details

### height Get the paper height in points (`float`). Get Method: height(self) - Get the paper height in points (`float`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### ID Get the paper IDentifier (`str`). Get Method: ID(self) - Get the paper IDentifier (`str`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### isCustom True if this is a custom paper (`bool`). Get Method: isCustom(self) - True if this is a custom paper (`bool`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### margins Get the paper margins (PaperMargins). Get Method: margins(self) - Get the paper margins (PaperMargins). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### name Get the paper name (`str`). Get Method: name(self) - Get the paper name (`str`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### PPD Get the paper's PPD name (`URL`). Get Method: PPD(self) - Get the paper's PPD name (`URL`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### printer Get the printer corresponding to this paper (`Printer`) or `None`. Get Method: printer(self) - Get the printer corresponding to this paper (`Printer`) or `None`. Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### size2inch Get 2-tuple (width, height) in inch (`float`s). Get Method: size2inch(self) - Get 2-tuple (width, height) in inch (`float`s). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### size2mm Get 2-tuple (width, height) in millimeter (`float`s). Get Method: size2mm(self) - Get 2-tuple (width, height) in millimeter (`float`s). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.

### width Get the paper width in points (`float`). Get Method: width(self) - Get the paper width in points (`float`). Set Method: Read_Only(inst, value) - Throws an `AttributeError`, always.