add ordermanager combination
This commit is contained in:
@ -66,7 +66,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
||||
$sFilename = $this->getFilename();
|
||||
$oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties());
|
||||
$oPdf->writeHTML($this->getHTMLContent($iSelLang));
|
||||
$oPdf->output($sFilename, $target);
|
||||
return $oPdf->output($sFilename, $target);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -84,6 +84,30 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $iLanguage
|
||||
*
|
||||
* @return null|string
|
||||
* @throws Html2PdfException
|
||||
*/
|
||||
public function getPdfContent($iLanguage = 0)
|
||||
{
|
||||
try {
|
||||
$sFilename = $this->getFilename();
|
||||
ob_start();
|
||||
//$this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STDOUT );
|
||||
$this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING );
|
||||
return ob_get_contents();
|
||||
} catch (pdfGeneratorExceptionAbstract $e) {
|
||||
Registry::get(UtilsView::class)->addErrorToDisplay($e);
|
||||
Registry::getLogger()->error($e);
|
||||
} catch (\Exception $e) {
|
||||
dumpvar($e->getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function setSmartyVars()
|
||||
{
|
||||
$this->oSmarty->assign('oConfig', Registry::getSession()->getConfig());
|
||||
|
Reference in New Issue
Block a user