BUG 10746 I added a validate to pdf size SOLVED
I added a validate to pdf size
This commit is contained in:
2
gulliver/thirdparty/html2ps_pdf/box.php
vendored
2
gulliver/thirdparty/html2ps_pdf/box.php
vendored
@@ -89,7 +89,7 @@ function _fix_display_position_float(&$css_state) {
|
|||||||
|
|
||||||
function &create_pdf_box(&$root, &$pipeline) {
|
function &create_pdf_box(&$root, &$pipeline) {
|
||||||
if ( !(@function_exists($root->node_type)) ) {
|
if ( !(@function_exists($root->node_type)) ) {
|
||||||
throw new Exception("Pdf not created", 1);
|
throw new Exception("ID_OUTPUT_NOT_GENERATE", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($root->node_type()) {
|
switch ($root->node_type()) {
|
||||||
|
|||||||
@@ -1116,7 +1116,7 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if ($e->getMessage() == 'Pdf not created') {
|
if ($e->getMessage() == 'ID_OUTPUT_NOT_GENERATE') {
|
||||||
include_once ("classes/model/AppDocument.php");
|
include_once ("classes/model/AppDocument.php");
|
||||||
list($sFileUID,$docVersion) = explode('_',$sFilename);
|
list($sFileUID,$docVersion) = explode('_',$sFilename);
|
||||||
$oAppDocument = new AppDocument ();
|
$oAppDocument = new AppDocument ();
|
||||||
|
|||||||
Reference in New Issue
Block a user