Add test to work with old FPDF.
This commit is contained in:
parent
e7d07c0a91
commit
18aecbaa9e
@ -77,7 +77,11 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
require_once(TCPDF_PATH.'tcpdf.php');
|
if (! empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->MAIN_DISABLE_FPDI))
|
||||||
|
return "Error MAIN_USE_PDF and MAIN_DISABLE_FPDI can't be set together";
|
||||||
|
|
||||||
|
// We use by default TCPDF
|
||||||
|
if (empty($conf->global->MAIN_USE_FPDF)) require_once(TCPDF_PATH.'tcpdf.php');
|
||||||
// We need to instantiate fpdi object (instead of tcpdf) to use merging features. But we can disable it.
|
// We need to instantiate fpdi object (instead of tcpdf) to use merging features. But we can disable it.
|
||||||
if (empty($conf->global->MAIN_DISABLE_FPDI)) require_once(FPDI_PATH.'fpdi.php');
|
if (empty($conf->global->MAIN_DISABLE_FPDI)) require_once(FPDI_PATH.'fpdi.php');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user