Work on compatibility between FPDF and TCPDF. Now language file main.lang can be used to defined which font to use with TCPDF (Always Helvetica with FPDF).
This commit is contained in:
parent
5eecf7b671
commit
c7c4a83f58
@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/fpdf/fpdfi/fpdi.php");
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
@ -54,6 +53,9 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire)
|
||||
{
|
||||
if (is_array($_POST['toGenerate']))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/fpdf/fpdfi/fpdi.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
$factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('\.pdf|',$_POST['toGenerate']).'\.pdf','\.meta$|\.png','date',SORT_DESC) ;
|
||||
|
||||
// liste les fichiers
|
||||
@ -77,7 +79,7 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire)
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
//$pdf->Open();
|
||||
//$pdf->AddPage();
|
||||
@ -156,7 +158,7 @@ jQuery(document).ready(function() {
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
$now=gmmktime();
|
||||
$now=dol_now();
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortfield=$_GET["sortfield"];
|
||||
|
||||
@ -124,7 +124,7 @@ class CommActionRapport
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -132,7 +132,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/modules_commande.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
/**
|
||||
* \class pdf_edison
|
||||
@ -151,7 +152,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -351,7 +352,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -32,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/modules_commande.php
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -172,7 +173,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -452,7 +453,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
require_once DOL_DOCUMENT_ROOT."/includes/modules/expedition/pdf/ModelePdfExpedition.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/contact/class/contact.class.php";
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -159,7 +160,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -277,7 +277,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -32,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -175,7 +176,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -572,7 +573,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -32,12 +32,13 @@
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
\class pdf_oursin
|
||||
\brief Classe permettant de generer les factures au modele oursin
|
||||
* \class pdf_oursin
|
||||
* \brief Classe permettant de generer les factures au modele oursin
|
||||
*/
|
||||
|
||||
class pdf_oursin extends ModelePDFFactures
|
||||
{
|
||||
var $emetteur; // Objet societe qui emet
|
||||
@ -172,7 +173,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -464,7 +465,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -144,7 +145,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -29,13 +29,13 @@
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/livraison/modules_livraison.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
* \class pdf_sirocco
|
||||
* \brief Classe permettant de generer les bons de livraison au modele Sirocco
|
||||
*/
|
||||
|
||||
class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
// Complete object by loading several other informations
|
||||
$expedition=new Expedition($this->db);
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/livraison/modules_livraison.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/livraison/class/livraison.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -157,7 +158,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
// Complete object by loading several other informations
|
||||
$expedition=new Expedition($this->db);
|
||||
|
||||
@ -417,7 +417,7 @@ class pdf_standard {
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->SetTitle($outputlangs->transnoentities('MembersCards'));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("MembersCards"));
|
||||
|
||||
@ -396,7 +396,7 @@ class pdf_standardlabel {
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->SetTitle($outputlangs->transnoentities('MembersLabels'));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("MembersLabels"));
|
||||
|
||||
@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/project/modules_project.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -141,7 +142,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
// Complete object by loading several other informations
|
||||
$task = new Task($this->db);
|
||||
|
||||
@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -172,7 +173,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -459,7 +460,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -145,7 +146,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
@ -338,7 +339,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
|
||||
@ -122,7 +122,7 @@ class pdf_paiement
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$sql = "SELECT p.datep as dp, f.facnumber";
|
||||
//$sql .= ", c.libelle as paiement_type, p.num_paiement";
|
||||
|
||||
@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/supplier_invoice/modules_factu
|
||||
require_once(DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -161,7 +162,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -30,6 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/supplier_order/modules_command
|
||||
require_once(DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -162,7 +163,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
FONTFORPDF=DejaVuSans
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
FormatDateShort=%d-%m-%Y
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
FONTFORPDF=DejaVuSans
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
FormatDateShort=%d.%m.%Y
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
FONTFORPDF=DejaVuSans
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
FormatDateShort=%d.%m.%Y
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DIRECTION=ltr
|
||||
FONTFORPDF=DejaVuSans
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
FormatDateShort=%d/%m/%Y
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DIRECTION=升
|
||||
FONTFORPDF=?????
|
||||
SeparatorDecimal=。
|
||||
SeparatorThousand=,
|
||||
FormatDateShort=%d/%m/%Y
|
||||
|
||||
@ -28,6 +28,24 @@
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Return font name to use for PDF generation
|
||||
* @param outputlangs Output langs object
|
||||
* @return string Name of font to use
|
||||
*/
|
||||
function pdf_getPDFFont($outputlangs)
|
||||
{
|
||||
$font='Helvetica'; // By default, for FPDI
|
||||
if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower)
|
||||
{
|
||||
if ($outputlangs->trans('FONTFORPDF')!='FONTFORPDF')
|
||||
{
|
||||
$font=$outputlangs->trans('FONTFORPDF');
|
||||
}
|
||||
}
|
||||
return $font;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a formated address (part address/zip/town/state) according to country rules
|
||||
|
||||
@ -41,6 +41,7 @@ require_once(DOL_DOCUMENT_ROOT."/cron/functions_cron.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/fpdf/fpdfi/fpdi.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
|
||||
|
||||
// Load main language strings
|
||||
@ -298,7 +299,7 @@ if ( $resql=$db->query($sql) )
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont('Helvetica');
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
//$pdf->Open();
|
||||
//$pdf->AddPage();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user