Fix: pdf_getPDFFontSize must be after pdf_getInstance
This commit is contained in:
parent
b1c13e373a
commit
effe169850
@ -152,8 +152,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->commande->dir_output)
|
if ($conf->commande->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -188,7 +186,8 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
// Create pdf instance
|
// Create pdf instance
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|||||||
@ -84,7 +84,6 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
||||||
{
|
{
|
||||||
global $user,$conf,$langs,$mysoc;
|
global $user,$conf,$langs,$mysoc;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@ -147,6 +146,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format,'mm','l');
|
$pdf=pdf_getInstance($this->format,'mm','l');
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
$heightforinfotot = 0; // Height reserved to output the info and total part
|
$heightforinfotot = 0; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -87,7 +87,6 @@ class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
||||||
{
|
{
|
||||||
global $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@ -133,7 +132,8 @@ class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
$heightforinfotot = 0; // Height reserved to output the info and total part
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
$heightforinfotot = 0; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|||||||
@ -150,8 +150,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -186,6 +184,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
@ -197,6 +196,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->setPrintFooter(false);
|
$pdf->setPrintFooter(false);
|
||||||
}
|
}
|
||||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||||
|
|
||||||
// Set path to the background PDF File
|
// Set path to the background PDF File
|
||||||
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -117,8 +117,6 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("interventions");
|
$outputlangs->load("interventions");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->ficheinter->dir_output)
|
if ($conf->ficheinter->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -140,6 +138,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -113,7 +113,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
function write_file($object,$outputlangs)
|
function write_file($object,$outputlangs)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, 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
|
||||||
@ -150,6 +149,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -108,8 +108,6 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
{
|
{
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontsize($outputlangs);
|
|
||||||
|
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->projet->dir_output;
|
$dir = $conf->projet->dir_output;
|
||||||
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
||||||
@ -127,6 +125,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -152,8 +152,6 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -188,6 +186,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// Create pdf instance
|
// Create pdf instance
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -146,8 +146,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->fournisseur->dir_output.'/facture')
|
if ($conf->fournisseur->dir_output.'/facture')
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -184,6 +182,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
@ -156,8 +156,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->fournisseur->dir_output.'/commande')
|
if ($conf->fournisseur->dir_output.'/commande')
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -196,6 +194,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user