From 889f71db6f516d9ab449e2f50d13aa5e0b95a400 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Sep 2012 12:52:54 +0200 Subject: [PATCH] Fix: Color of lines must be set for each lines --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 3 ++- .../expedition/doc/pdf_expedition_merou.modules.php | 6 ++++-- .../expedition/doc/pdf_expedition_rouget.modules.php | 4 +++- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 3 ++- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 3 ++- htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php | 7 ++++--- htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php | 7 +++---- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 3 ++- .../modules/supplier_invoice/pdf/pdf_canelle.modules.php | 3 ++- .../modules/supplier_order/pdf/pdf_muscadet.modules.php | 3 ++- 10 files changed, 26 insertions(+), 16 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 082339490a2..d1beb882588 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -262,7 +262,8 @@ class pdf_einstein extends ModelePDFCommandes { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php index c7e7c4c1744..ad3cf02fcf6 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Laurent Destailleur + * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -195,11 +195,13 @@ class pdf_expedition_merou extends ModelePdfExpedition $nexY = $tab_top + 7; $num=count($object->lines); + // Loop on each lines for ($i = 0; $i < $num; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 3); - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index 01888689100..fe8288d3cca 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Laurent Destailleur + * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -223,10 +223,12 @@ class pdf_expedition_rouget extends ModelePdfExpedition $nexY = $tab_top + 7; $num=count($object->lines); + // Loop on each lines for ($i = 0; $i < $num; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 08ef7ae767c..44a1987aaf2 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -265,7 +265,8 @@ class pdf_crabe extends ModelePDFFactures { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index fd3f1242bf3..c4b9c11f6be 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -246,7 +246,8 @@ class pdf_soleil extends ModelePDFFicheinter { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php index 81d13e8cee5..481cb6849df 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php @@ -31,8 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * \class pdf_sirocco - * \brief Classe permettant de generer les bons de livraison au modele Sirocco + * Classe permettant de generer les bons de livraison au modele Sirocco */ class pdf_sirocco extends ModelePDFDeliveryOrder { @@ -180,11 +179,13 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $curY = $tab_top + 7; $nexY = $tab_top + 7; + // Loop on each lines for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index b9cfc5ea909..16200636ce4 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * \class pdf_typhon - * \brief Classe permettant de generer les bons de livraison au modele Typho + * Classe permettant de generer les bons de livraison au modele Typho */ - class pdf_typhon extends ModelePDFDeliveryOrder { var $emetteur; // Objet societe qui emet @@ -236,11 +234,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder $curY = $tab_top + 7; $nexY = $tab_top + 7; - // Boucle sur les lignes + // Loop on each lines for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot-50); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index d7e4cd7e538..0a2d1484bdd 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -263,7 +263,8 @@ class pdf_azur extends ModelePDFPropales { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 01649837213..77ae627120f 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -260,7 +260,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index bdd23c5b1da..67786e0a944 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -272,7 +272,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - + $pdf->SetTextColor(0,0,0); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage();