public function __construct($dest)
{
$valid = $this->getLocalPrinters();
if (count($valid) == 0) {
throw new BadMethodCallException("You do not have any printers installed on " . "this system via CUPS. Check 'lpr -a'.");
}
if (array_search($dest, $valid, true) === false) {
throw new BadMethodCallException("'{$dest}' is not a printer on this system. " . "Printers are: [" . implode(", ", $valid) . "]");
}
$this->buffer = array();
$this->printerName = $dest;
}