Works on migration of FPDF to TCPDF
This commit is contained in:
parent
2ab7e6c142
commit
af79efb0cc
@ -29,7 +29,8 @@ if (defined('DOL_URL_ROOT')) define ("K_PATH_URL_CACHE", DOL_URL_ROOT."/document
|
|||||||
/* End DOLCHANGE Added by Regis */
|
/* End DOLCHANGE Added by Regis */
|
||||||
|
|
||||||
// DOLCHANGE LDR
|
// DOLCHANGE LDR
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdf/fpdf.php');
|
if (empty($conf->MAIN_USE_TCPDF)) require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdf/fpdf.php');
|
||||||
|
else require_once(DOL_DOCUMENT_ROOT.'/includes/tcpdf/tcpdf.php');
|
||||||
//require_once(DOL_DOCUMENT_ROOT.'/includes/tcpdf/tcpdf.php');
|
//require_once(DOL_DOCUMENT_ROOT.'/includes/tcpdf/tcpdf.php');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -75,8 +75,8 @@ class CommActionRapport
|
|||||||
global $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -88,8 +88,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
global $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -96,8 +96,8 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
global $user,$conf,$langs,$mysoc;
|
global $user,$conf,$langs,$mysoc;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -111,8 +111,8 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -77,8 +77,8 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
global $user,$conf,$langs,$mysoc;
|
global $user,$conf,$langs,$mysoc;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -221,8 +221,8 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -111,8 +111,8 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -85,8 +85,8 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
global $user,$langs,$conf,$mysoc;
|
global $user,$langs,$conf,$mysoc;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -84,9 +84,8 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
global $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -105,9 +105,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -375,8 +375,8 @@ class pdf_standard {
|
|||||||
$this->format = $this->Tformat['paper-size'];
|
$this->format = $this->Tformat['paper-size'];
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -354,8 +354,8 @@ class pdf_standardlabel {
|
|||||||
$this->format = $this->Tformat['paper-size'];
|
$this->format = $this->Tformat['paper-size'];
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -94,9 +94,8 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -110,9 +110,9 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
@ -948,7 +948,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','',8);
|
$pdf->SetFont('','',8);
|
||||||
$pdf->SetXY($posx,$posy-5);
|
$pdf->SetXY($posx,$posy-5);
|
||||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":");
|
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetFillColor(230,230,230);
|
$pdf->SetFillColor(230,230,230);
|
||||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||||
@ -962,7 +962,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
// Show sender information
|
// Show sender information
|
||||||
$pdf->SetFont('','',9);
|
$pdf->SetFont('','',9);
|
||||||
$pdf->SetXY($posx+2,$posy+8);
|
$pdf->SetXY($posx+2,$posy+8);
|
||||||
$pdf->MultiCell(80, 4, $carac_emetteur);
|
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||||
|
|
||||||
|
|
||||||
// If CUSTOMER contact defined, we use it
|
// If CUSTOMER contact defined, we use it
|
||||||
@ -998,7 +998,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','',8);
|
$pdf->SetFont('','',8);
|
||||||
$pdf->SetXY($posx,$posy-5);
|
$pdf->SetXY($posx,$posy-5);
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":");
|
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||||
$pdf->rect($posx, $posy, 100, $hautcadre);
|
$pdf->rect($posx, $posy, 100, $hautcadre);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
@ -1010,7 +1010,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
// Show recipient information
|
// Show recipient information
|
||||||
$pdf->SetFont('','',9);
|
$pdf->SetFont('','',9);
|
||||||
$pdf->SetXY($posx+2,$posy+8);
|
$pdf->SetXY($posx+2,$posy+8);
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,9 +86,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
@ -520,7 +520,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetFont('','',9);
|
$pdf->SetFont('','',9);
|
||||||
$pdf->SetXY($this->marge_gauche+2,$posy+4);
|
$pdf->SetXY($this->marge_gauche+2,$posy+4);
|
||||||
$pdf->MultiCell(80, 4, $carac_emetteur);
|
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||||
|
|
||||||
|
|
||||||
$pdf->rect(10, 40, 80, 40);
|
$pdf->rect(10, 40, 80, 40);
|
||||||
@ -540,9 +540,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->rect(110, 90, 90, 10);
|
$pdf->rect(110, 90, 90, 10);
|
||||||
|
|
||||||
$pdf->SetXY(10,90);
|
$pdf->SetXY(10,90);
|
||||||
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref));
|
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), 0, 'L');
|
||||||
$pdf->SetXY(110,90);
|
$pdf->SetXY(110,90);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs,true));
|
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs,true), 0, 'L');
|
||||||
|
|
||||||
$posy=15;
|
$posy=15;
|
||||||
$pdf->SetFont('','',10);
|
$pdf->SetFont('','',10);
|
||||||
@ -609,7 +609,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
// Show address
|
// Show address
|
||||||
$pdf->SetFont('','',9);
|
$pdf->SetFont('','',9);
|
||||||
$pdf->SetXY(102,$posy+8);
|
$pdf->SetXY(102,$posy+8);
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -81,8 +81,8 @@ class pdf_paiement
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$this->month=$month;
|
$this->month=$month;
|
||||||
$this->year=$year;
|
$this->year=$year;
|
||||||
|
|||||||
@ -102,8 +102,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
if (!class_exists('TCPDF', false)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -73,7 +73,7 @@ function pdf_format_address($outputlangs,$object)
|
|||||||
* @param targetcompany Target company object
|
* @param targetcompany Target company object
|
||||||
* @param targetcontact Target contact object
|
* @param targetcontact Target contact object
|
||||||
* @param usecontact Use contact instead of company
|
* @param usecontact Use contact instead of company
|
||||||
* @return string Source of file
|
* @return string String with full address
|
||||||
*/
|
*/
|
||||||
function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source')
|
function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user