pycocoa.printers

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

# Module printers

Types Printer, Paper, PaperCustom and PaperMargins, wrapping ObjC `NSPrinter`, `PMPrinter`, `PMPaper` respectively `PMPaperMargins` plus several `get_...` print functions.

Version: 25.06.09

Classes
| Paper Python `Paper` Type, wrapping an opaque ObjC `PMPaper`.
| PaperCustom Create a custom Paper.
| PaperMargins Python `PaperMargins` Type, wrapping an ObjC `PMPaperMargins`.
| Printer Python `Printer` Type, wrapping ObjC `NSPrinter` and `PMPrinter`.

Functions
get_papers(*printers) Yield the papers available at the given printer(s). |
get_printer(*prefixes) Find a printer by name or by ID or get the default printer. |
get_printer_browser(server=None) Show the printer browser for the given server. |
get_printers(server=None) Yield all printers available at the given server. |
get_resolutions(*printers) Yield the resolutions supported by the given printer(s). |

Variables
| __all__ = `_ALL_LAZY.printers`
| d = `get_printer()`
| p = `Paper('A4')`

Function Details

### get_papers(*printers) |
Yield the papers available at the given printer(s). Parameters: `printers` - No, one or more printers (Printers). Returns: Each paper (Paper).

### get_printer(*prefixes) |
Find a printer by name or by ID or get the default printer. Parameters: `prefixes` - No, one or more printer names or IDs to match (`str`s). Returns: The printer (Printer) or `None` if none found.

### get_printer_browser(server=None) |
Show the printer browser for the given server. Parameters: `server` - Print server (`PMServer`) or `None` for this server, the localhost. Returns: Printers (`dict`) or `None`.

### get_printers(server=None) |
Yield all printers available at the given server. Parameters: `server` - Print server (`PMServer`) or `None` for this server, the localhost. Returns: Each printer (Printer).

### get_resolutions(*printers) |
Yield the resolutions supported by the given printer(s). Parameters: `printers` - No, one or more printers (Printers). Returns: A 2-tuple (horizontal, vertical) in dots per inch (`float`s) for each resolution.