@@ -285,9 +285,10 @@ class Document extends ActiveRecordCommon | |||
{ | |||
$filenameComplete = $this->getFilenameComplete(); | |||
if (!file_exists($filenameComplete)) { | |||
/*if (!file_exists($filenameComplete)) { | |||
$this->generatePdf(Pdf::DEST_FILE); | |||
} | |||
}*/ | |||
$this->generatePdf(Pdf::DEST_FILE); | |||
if (file_exists($filenameComplete)) { | |||
return Yii::$app->response->sendFile($filenameComplete, $this->getFilename(), ['inline' => true]); |