Inheritance: extends PrintAbstract
Exemple #1
0
 /**
  * @param $documentId
  * @throws \Exception
  */
 public function cancelGeneration($documentId)
 {
     $document = Document\Printpage::getById($documentId);
     if (empty($document)) {
         throw new \Exception("Document with id " . $documentId . " not found.");
     }
     Model\Tool\Lock::release($document->getLockKey());
     Model\Tool\TmpStore::delete($document->getLockKey());
 }
Exemple #2
0
 public function startPdfGenerationAction()
 {
     $document = Document\Printpage::getById(intval($this->getParam("id")));
     if (empty($document)) {
         throw new \Exception("Document with id " . $this->getParam("id") . " not found.");
     }
     $document->generatePdf($this->getAllParams());
     $this->saveProcessingOptions($document->getId(), $this->getAllParams());
     $this->_helper->json(["success" => true]);
 }