Removing referenced to deprecated library 'html2ps_pdf'
This commit is contained in:
@@ -402,7 +402,7 @@ class license_application extends Padl
|
||||
# check to see if the class has been secured
|
||||
$this->_check_secure();
|
||||
# get the dat string
|
||||
$dat_str = (!$str) ? @file_get_contents($this->_LICENSE_PATH) : $str;
|
||||
$dat_str = (!$str && !is_null($this->_LICENSE_PATH)) ? @file_get_contents($this->_LICENSE_PATH) : $str;
|
||||
if (strlen($dat_str) > 0) {
|
||||
# decrypt the data
|
||||
$DATA = $this->_unwrap_license($dat_str);
|
||||
|
||||
@@ -82,7 +82,7 @@ class PmGauge
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray = ImageColorAllocate($im, 190, 190, 190);
|
||||
|
||||
$fontArial = PATH_THIRDPARTY . 'html2ps_pdf/fonts/arial.ttf';
|
||||
$fontArial = PATH_HTML . 'fonts/dashlets/arial.ttf';
|
||||
|
||||
ImageFilledRectangle($im, 0, 0, $width - 1, $height - 1, $white);
|
||||
ImageRectangle($im, 0, 0, $width - 1, $height - 1, $gray);
|
||||
@@ -128,7 +128,7 @@ class PmGauge
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray = ImageColorAllocate($im, 190, 190, 190);
|
||||
|
||||
$fontArial = PATH_THIRDPARTY . 'html2ps_pdf/fonts/arial.ttf';
|
||||
$fontArial = PATH_HTML . 'fonts/dashlets/arial.ttf';
|
||||
|
||||
$dX = intval($diameter * 8 / 7); //for now ratio aspect is 8:7
|
||||
$dY = intval($diameter);
|
||||
|
||||
@@ -1785,12 +1785,12 @@ function PMFAddInputDocument(
|
||||
$appDocUid,
|
||||
$docVersion,
|
||||
$appDocType = "INPUT",
|
||||
$appDocComment,
|
||||
$inputDocumentAction,
|
||||
$caseUid,
|
||||
$delIndex,
|
||||
$taskUid,
|
||||
$userUid,
|
||||
$appDocComment = "",
|
||||
$inputDocumentAction = "",
|
||||
$caseUid = "",
|
||||
$delIndex = 0,
|
||||
$taskUid = "",
|
||||
$userUid = "",
|
||||
$option = "file",
|
||||
$file = "path_to_file/myfile.txt"
|
||||
) {
|
||||
|
||||
@@ -682,15 +682,12 @@ class OutputDocument extends BaseOutputDocument
|
||||
if (isset($aProperties['report_generator'])) {
|
||||
switch ($aProperties['report_generator']) {
|
||||
case 'TCPDF':
|
||||
$this->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
break;
|
||||
case 'HTML2PDF':
|
||||
default:
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
$this->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
$this->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
}
|
||||
}
|
||||
//end if $sTypeDocToGener
|
||||
@@ -994,219 +991,6 @@ class OutputDocument extends BaseOutputDocument
|
||||
}
|
||||
}
|
||||
|
||||
public function generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $aProperties = array())
|
||||
{
|
||||
define("MAX_FREE_FRACTION", 1);
|
||||
define('PATH_OUTPUT_FILE_DIRECTORY', PATH_HTML . 'files/' . $_SESSION['APPLICATION'] . '/outdocs/');
|
||||
G::verifyPath(PATH_OUTPUT_FILE_DIRECTORY, true);
|
||||
require_once(PATH_THIRDPARTY . 'html2ps_pdf/config.inc.php');
|
||||
require_once(PATH_THIRDPARTY . 'html2ps_pdf/pipeline.factory.class.php');
|
||||
|
||||
parse_config_file(PATH_THIRDPARTY . 'html2ps_pdf/html2ps.config');
|
||||
|
||||
$GLOBALS['g_config'] = array(
|
||||
'cssmedia' => 'screen',
|
||||
'media' => 'Letter',
|
||||
'scalepoints' => false,
|
||||
'renderimages' => true,
|
||||
'renderfields' => true,
|
||||
'renderforms' => false,
|
||||
'pslevel' => 3,
|
||||
'renderlinks' => true,
|
||||
'pagewidth' => 800,
|
||||
'landscape' => $sLandscape,
|
||||
'method' => 'fpdf',
|
||||
'margins' => array('left' => 15, 'right' => 15, 'top' => 15, 'bottom' => 15,),
|
||||
'encoding' => (version_compare(PHP_VERSION, '5.4.0', '<') ? '' : 'utf-8'),
|
||||
'ps2pdf' => false,
|
||||
'compress' => true,
|
||||
'output' => 2,
|
||||
'pdfversion' => '1.3',
|
||||
'transparency_workaround' => false,
|
||||
'imagequality_workaround' => false,
|
||||
'draw_page_border' => isset($_REQUEST['pageborder']),
|
||||
'debugbox' => false,
|
||||
'html2xhtml' => true,
|
||||
'mode' => 'html',
|
||||
'smartpagebreak' => true
|
||||
);
|
||||
|
||||
$GLOBALS['g_config'] = array_merge($GLOBALS['g_config'], $aProperties);
|
||||
$g_media = Media::predefined($GLOBALS['g_config']['media']);
|
||||
$g_media->set_landscape($GLOBALS['g_config']['landscape']);
|
||||
$g_media->set_margins($GLOBALS['g_config']['margins']);
|
||||
$g_media->set_pixels($GLOBALS['g_config']['pagewidth']);
|
||||
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity'])) {
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['openPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['ownerPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
$g_media->set_security($GLOBALS['g_config']['pdfSecurity']);
|
||||
|
||||
require_once(HTML2PS_DIR . 'pdf.fpdf.encryption.php');
|
||||
}
|
||||
|
||||
$pipeline = new Pipeline();
|
||||
|
||||
if (extension_loaded('curl')) {
|
||||
require_once(HTML2PS_DIR . 'fetcher.url.curl.class.php');
|
||||
|
||||
$pipeline->fetchers = array(new FetcherURLCurl());
|
||||
|
||||
if (isset($proxy)) {
|
||||
if ($proxy != '') {
|
||||
$pipeline->fetchers[0]->set_proxy($proxy);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
require_once(HTML2PS_DIR . 'fetcher.url.class.php');
|
||||
$pipeline->fetchers[] = new FetcherURL();
|
||||
}
|
||||
|
||||
$pipeline->data_filters[] = new DataFilterDoctype();
|
||||
$pipeline->data_filters[] = new DataFilterUTF8($GLOBALS['g_config']['encoding']);
|
||||
|
||||
if ($GLOBALS['g_config']['html2xhtml']) {
|
||||
$pipeline->data_filters[] = new DataFilterHTML2XHTML();
|
||||
} else {
|
||||
$pipeline->data_filters[] = new DataFilterXHTML2XHTML();
|
||||
}
|
||||
|
||||
$pipeline->parser = new ParserXHTML();
|
||||
$pipeline->pre_tree_filters = [];
|
||||
$header_html = '';
|
||||
$footer_html = '';
|
||||
$filter = new PreTreeFilterHeaderFooter($header_html, $footer_html);
|
||||
$pipeline->pre_tree_filters[] = $filter;
|
||||
|
||||
if ($GLOBALS['g_config']['renderfields']) {
|
||||
$pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['method'] === 'ps') {
|
||||
$pipeline->layout_engine = new LayoutEnginePS();
|
||||
} else {
|
||||
$pipeline->layout_engine = new LayoutEngineDefault();
|
||||
}
|
||||
|
||||
$pipeline->post_tree_filters = [];
|
||||
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$image_encoder = new PSL3ImageEncoderStream();
|
||||
} else {
|
||||
$image_encoder = new PSL2ImageEncoderStream();
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['method']) {
|
||||
case 'fastps':
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$pipeline->output_driver = new OutputDriverFastPS($image_encoder);
|
||||
} else {
|
||||
$pipeline->output_driver = new OutputDriverFastPSLevel2($image_encoder);
|
||||
}
|
||||
break;
|
||||
case 'pdflib':
|
||||
$pipeline->output_driver = new OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
|
||||
break;
|
||||
case 'fpdf':
|
||||
$pipeline->output_driver = new OutputDriverFPDF();
|
||||
break;
|
||||
case 'png':
|
||||
$pipeline->output_driver = new OutputDriverPNG();
|
||||
break;
|
||||
case 'pcl':
|
||||
$pipeline->output_driver = new OutputDriverPCL();
|
||||
break;
|
||||
default:
|
||||
die('Unknown output method');
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['watermarkhtml'])) {
|
||||
$watermark_text = $GLOBALS['g_config']['watermarkhtml'];
|
||||
} else {
|
||||
$watermark_text = '';
|
||||
}
|
||||
|
||||
$pipeline->output_driver->set_watermark($watermark_text);
|
||||
|
||||
if ($watermark_text != '') {
|
||||
$dispatcher = $pipeline->getDispatcher();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['debugbox']) {
|
||||
$pipeline->output_driver->set_debug_boxes(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['draw_page_border']) {
|
||||
$pipeline->output_driver->set_show_page_border(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['ps2pdf']) {
|
||||
$pipeline->output_filters[] = new OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
|
||||
$pipeline->output_filters[] = new OutputFilterGZip();
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['g_config']['process_mode'])) {
|
||||
$GLOBALS['g_config']['process_mode'] = '';
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['process_mode'] == 'batch') {
|
||||
$filename = 'batch';
|
||||
} else {
|
||||
$filename = $sFilename;
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['output']) {
|
||||
case 0:
|
||||
$pipeline->destination = new DestinationBrowser($filename);
|
||||
break;
|
||||
case 1:
|
||||
$pipeline->destination = new DestinationDownload($filename);
|
||||
break;
|
||||
case 2:
|
||||
$pipeline->destination = new DestinationFile($filename);
|
||||
break;
|
||||
}
|
||||
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
try {
|
||||
$status = $pipeline->process(System::getServerProtocolHost() . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
} catch (Exception $e) {
|
||||
if ($e->getMessage() == 'ID_OUTPUT_NOT_GENERATE') {
|
||||
include_once 'classes/model/AppDocument.php';
|
||||
$dataDocument = explode('_', $sFilename);
|
||||
if (!isset($dataDocument[1])) {
|
||||
$dataDocument[1] = 1;
|
||||
}
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->remove($dataDocument[0], $dataDocument[1]);
|
||||
G::SendTemporalMessage(G::LoadTranslation('ID_OUTPUT_NOT_GENERATE'), 'Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* verify if Output row specified in [sUid] exists.
|
||||
*
|
||||
|
||||
@@ -728,6 +728,7 @@ class OutputDocument
|
||||
if (isset($aProperties['report_generator'])) {
|
||||
switch ($aProperties['report_generator']) {
|
||||
case 'TCPDF':
|
||||
default:
|
||||
$o = new \OutputDocument();
|
||||
if (strlen($sContent) == 0) {
|
||||
libxml_use_internal_errors(true);
|
||||
@@ -737,13 +738,10 @@ class OutputDocument
|
||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
}
|
||||
break;
|
||||
case 'HTML2PDF':
|
||||
default:
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties, $sApplication);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
$o = new \OutputDocument();
|
||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
}
|
||||
}
|
||||
//end if $sTypeDocToGener
|
||||
@@ -761,197 +759,6 @@ class OutputDocument
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate Html2ps_pdf
|
||||
* @param string $sUID
|
||||
* @param array $aFields
|
||||
* @param string $sPath
|
||||
* @param string $sApplication
|
||||
* @return variant
|
||||
*/
|
||||
public function generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $aProperties = array(), $sApplication)
|
||||
{
|
||||
define("MAX_FREE_FRACTION", 1);
|
||||
define('PATH_OUTPUT_FILE_DIRECTORY', PATH_HTML . 'files/' . $sApplication . '/outdocs/');
|
||||
\G::verifyPath(PATH_OUTPUT_FILE_DIRECTORY, true);
|
||||
require_once(PATH_THIRDPARTY . 'html2ps_pdf/config.inc.php');
|
||||
require_once(PATH_THIRDPARTY . 'html2ps_pdf/pipeline.factory.class.php');
|
||||
parse_config_file(PATH_THIRDPARTY . 'html2ps_pdf/html2ps.config');
|
||||
$GLOBALS['g_config'] = array(
|
||||
'cssmedia' => 'screen',
|
||||
'media' => 'Letter',
|
||||
'scalepoints' => false,
|
||||
'renderimages' => true,
|
||||
'renderfields' => true,
|
||||
'renderforms' => false,
|
||||
'pslevel' => 3,
|
||||
'renderlinks' => true,
|
||||
'pagewidth' => 800,
|
||||
'landscape' => $sLandscape,
|
||||
'method' => 'fpdf',
|
||||
'margins' => array('left' => 15, 'right' => 15, 'top' => 15, 'bottom' => 15,),
|
||||
'encoding' => '',
|
||||
'ps2pdf' => false,
|
||||
'compress' => true,
|
||||
'output' => 2,
|
||||
'pdfversion' => '1.3',
|
||||
'transparency_workaround' => false,
|
||||
'imagequality_workaround' => false,
|
||||
'draw_page_border' => isset($_REQUEST['pageborder']),
|
||||
'debugbox' => false,
|
||||
'html2xhtml' => true,
|
||||
'mode' => 'html',
|
||||
'smartpagebreak' => true
|
||||
);
|
||||
$GLOBALS['g_config'] = array_merge($GLOBALS['g_config'], $aProperties);
|
||||
$g_media = \Media::predefined($GLOBALS['g_config']['media']);
|
||||
$g_media->set_landscape($GLOBALS['g_config']['landscape']);
|
||||
$g_media->set_margins($GLOBALS['g_config']['margins']);
|
||||
$g_media->set_pixels($GLOBALS['g_config']['pagewidth']);
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity'])) {
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['openPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['ownerPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
$g_media->set_security($GLOBALS['g_config']['pdfSecurity']);
|
||||
require_once(HTML2PS_DIR . 'pdf.fpdf.encryption.php');
|
||||
}
|
||||
$pipeline = new \Pipeline();
|
||||
if (extension_loaded('curl')) {
|
||||
require_once(HTML2PS_DIR . 'fetcher.url.curl.class.php');
|
||||
$pipeline->fetchers = array(new \FetcherURLCurl());
|
||||
if (isset($proxy)) {
|
||||
if ($proxy != '') {
|
||||
$pipeline->fetchers[0]->set_proxy($proxy);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
require_once(HTML2PS_DIR . 'fetcher.url.class.php');
|
||||
$pipeline->fetchers[] = new \FetcherURL();
|
||||
}
|
||||
$pipeline->data_filters[] = new \DataFilterDoctype();
|
||||
$pipeline->data_filters[] = new \DataFilterUTF8($GLOBALS['g_config']['encoding']);
|
||||
if ($GLOBALS['g_config']['html2xhtml']) {
|
||||
$pipeline->data_filters[] = new \DataFilterHTML2XHTML();
|
||||
} else {
|
||||
$pipeline->data_filters[] = new \DataFilterXHTML2XHTML();
|
||||
}
|
||||
$pipeline->parser = new \ParserXHTML();
|
||||
$pipeline->pre_tree_filters = array();
|
||||
$header_html = '';
|
||||
$footer_html = '';
|
||||
$filter = new \PreTreeFilterHeaderFooter($header_html, $footer_html);
|
||||
$pipeline->pre_tree_filters[] = $filter;
|
||||
|
||||
if ($GLOBALS['g_config']['renderfields']) {
|
||||
$pipeline->pre_tree_filters[] = new \PreTreeFilterHTML2PSFields();
|
||||
}
|
||||
if ($GLOBALS['g_config']['method'] === 'ps') {
|
||||
$pipeline->layout_engine = new \LayoutEnginePS();
|
||||
} else {
|
||||
$pipeline->layout_engine = new \LayoutEngineDefault();
|
||||
}
|
||||
$pipeline->post_tree_filters = array();
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$image_encoder = new \PSL3ImageEncoderStream();
|
||||
} else {
|
||||
$image_encoder = new \PSL2ImageEncoderStream();
|
||||
}
|
||||
switch ($GLOBALS['g_config']['method']) {
|
||||
case 'fastps':
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$pipeline->output_driver = new \OutputDriverFastPS($image_encoder);
|
||||
} else {
|
||||
$pipeline->output_driver = new \OutputDriverFastPSLevel2($image_encoder);
|
||||
}
|
||||
break;
|
||||
case 'pdflib':
|
||||
$pipeline->output_driver = new \OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
|
||||
break;
|
||||
case 'fpdf':
|
||||
$pipeline->output_driver = new \OutputDriverFPDF();
|
||||
break;
|
||||
case 'png':
|
||||
$pipeline->output_driver = new \OutputDriverPNG();
|
||||
break;
|
||||
case 'pcl':
|
||||
$pipeline->output_driver = new \OutputDriverPCL();
|
||||
break;
|
||||
default:
|
||||
die('Unknown output method');
|
||||
}
|
||||
if (isset($GLOBALS['g_config']['watermarkhtml'])) {
|
||||
$watermark_text = $GLOBALS['g_config']['watermarkhtml'];
|
||||
} else {
|
||||
$watermark_text = '';
|
||||
}
|
||||
$pipeline->output_driver->set_watermark($watermark_text);
|
||||
if ($watermark_text != '') {
|
||||
$dispatcher = $pipeline->getDispatcher();
|
||||
}
|
||||
if ($GLOBALS['g_config']['debugbox']) {
|
||||
$pipeline->output_driver->set_debug_boxes(true);
|
||||
}
|
||||
if ($GLOBALS['g_config']['draw_page_border']) {
|
||||
$pipeline->output_driver->set_show_page_border(true);
|
||||
}
|
||||
if ($GLOBALS['g_config']['ps2pdf']) {
|
||||
$pipeline->output_filters[] = new \OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
|
||||
}
|
||||
if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
|
||||
$pipeline->output_filters[] = new \OutputFilterGZip();
|
||||
}
|
||||
if (!isset($GLOBALS['g_config']['process_mode'])) {
|
||||
$GLOBALS['g_config']['process_mode'] = '';
|
||||
}
|
||||
if ($GLOBALS['g_config']['process_mode'] == 'batch') {
|
||||
$filename = 'batch';
|
||||
} else {
|
||||
$filename = $sFilename;
|
||||
}
|
||||
switch ($GLOBALS['g_config']['output']) {
|
||||
case 0:
|
||||
$pipeline->destination = new \DestinationBrowser($filename);
|
||||
break;
|
||||
case 1:
|
||||
$pipeline->destination = new \DestinationDownload($filename);
|
||||
break;
|
||||
case 2:
|
||||
$pipeline->destination = new \DestinationFile($filename);
|
||||
break;
|
||||
}
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
try {
|
||||
$status = $pipeline->process(System::getServerProtocolHost() . '/files/' . $sApplication . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
} catch (\Exception $e) {
|
||||
if ($e->getMessage() == 'ID_OUTPUT_NOT_GENERATE') {
|
||||
include_once 'classes/model/AppDocument.php';
|
||||
$dataDocument = explode('_', $sFilename);
|
||||
if (!isset($dataDocument[1])) {
|
||||
$dataDocument[1] = 1;
|
||||
}
|
||||
$oAppDocument = new \AppDocument();
|
||||
$oAppDocument->remove($dataDocument[0], $dataDocument[1]);
|
||||
\G::SendTemporalMessage(\G::LoadTranslation('ID_OUTPUT_NOT_GENERATE'), 'Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check of user has permission of process
|
||||
*
|
||||
|
||||
BIN
workflow/public_html/fonts/dashlets/arial.ttf
Normal file
BIN
workflow/public_html/fonts/dashlets/arial.ttf
Normal file
Binary file not shown.
BIN
workflow/public_html/fonts/dashlets/arialbd.ttf
Normal file
BIN
workflow/public_html/fonts/dashlets/arialbd.ttf
Normal file
Binary file not shown.
BIN
workflow/public_html/fonts/dashlets/arialbi.ttf
Normal file
BIN
workflow/public_html/fonts/dashlets/arialbi.ttf
Normal file
Binary file not shown.
BIN
workflow/public_html/fonts/dashlets/ariali.ttf
Normal file
BIN
workflow/public_html/fonts/dashlets/ariali.ttf
Normal file
Binary file not shown.
@@ -378,7 +378,6 @@ $virtualURITable['/(sys*)'] = false;
|
||||
$virtualURITable["/errors/(*)"] = ($skinPathErrors != "") ? $skinPathErrors : PATH_GULLIVER_HOME . "methods" . PATH_SEP . "errors" . PATH_SEP;
|
||||
$virtualURITable['/gulliver/(*)'] = PATH_GULLIVER_HOME . 'methods/';
|
||||
$virtualURITable['/controls/(*)'] = PATH_GULLIVER_HOME . 'methods/controls/';
|
||||
$virtualURITable['/html2ps_pdf/(*)'] = PATH_THIRDPARTY . 'html2ps_pdf/';
|
||||
//$virtualURITable['/images/'] = 'errorFile';
|
||||
//$virtualURITable['/skins/'] = 'errorFile';
|
||||
//$virtualURITable['/files/'] = 'errorFile';
|
||||
|
||||
Reference in New Issue
Block a user