/** * Adiciona um conteúdo sobre o documento de impressão * * @param ZendT_Printer_Document $document * @return \ZendT_Printer * @throws ZendT_Exception_Error */ public function addContent(ZendT_Printer_Document $document) { if (!$this->_idDocument) { throw new ZendT_Exception_Error('Para executar esse procedimento e preciso chamar o método startDocument!'); } $param = array(); $param['pIdDocument'] = $this->_idDocument; $param['pDocument']['Content'] = $document->getContent(); $param['pDocument']['Duplex'] = $document->getDuplex(); $param['pDocument']['Paper'] = $document->getPaper(); $param['pDocument']['FormName'] = $document->getFormName(); $param['pDocument']['FileName'] = $document->getFileName(); $param['pDocument']['Param'] = $document->getParam(); $param['pDocument']['CmdPrinter'] = $document->getCmdPrinter(); $param['pDocument']['Resolution'] = $document->getResolution(); $param['pDocument']['InputSlot'] = $document->getInputSlot(); $param['pDocument']['MediaType'] = $document->getMediaType(); $param['pDocument']['Copies'] = $document->getCopies(); #$param['pDocument']['PrintDriverName'] = $document->getPrintDriverName(); $result = $this->_client->AddContent($param); if ($result->AddContentResult->ErrorCode) { throw new ZendT_Exception_Error('(' . $result->AddContentResult->ErrorCode . ') :: ' . $result->AddContentResult->ErrorMessage . ' :: Erro ao iniciar processo de impressão. '); } return $this; }