printer_open

Opens a connection to a printer

&reftitle.description; `resource` `printer_open` `string` `printername`

This function tries to open a connection to the given printer.

`printer_open` also starts a device context.

&reftitle.parameters;

`printername`

- The printer name. If no parameter was given it tries to open a connection to the default printer (if not specified in &php.ini; as `printer.default_printer`, PHP tries to detect it).

&reftitle.returnvalues;

Returns a printer handle on success&return.falseforfailure;.

&reftitle.examples;

### `printer_open` example

    <?php
    $handle = printer_open("HP Deskjet 930c");
    $handle = printer_open();
    ?>