diff --git a/library/html2pdf/README_OpenEMR.txt b/library/html2pdf/README_OpenEMR.txt index 24c6e258ea3..bc304aebb89 100644 --- a/library/html2pdf/README_OpenEMR.txt +++ b/library/html2pdf/README_OpenEMR.txt @@ -10,3 +10,12 @@ This html2pdf directory was created by: 3. Removing the examples directory from the html2pdf directory. +4. Modifying library/html2pdf/fpdi/fpdf_tpl.php so that + FPDF_TPL extends MyPDF instead of FPDF. Note that FPDI extends + FPDF_TPL. + +5. Modifying library/html2pdf/html2pdf.class.php to create its member + pdf object as an instance of FPDI instead of MyPDF. + +At this point the HTML2PDF class now includes the FPDI features. + diff --git a/library/html2pdf/fpdi/fpdf_tpl.php b/library/html2pdf/fpdi/fpdf_tpl.php index d21743e6374..d6c760cecc4 100644 --- a/library/html2pdf/fpdi/fpdf_tpl.php +++ b/library/html2pdf/fpdi/fpdf_tpl.php @@ -17,7 +17,7 @@ // limitations under the License. // -class FPDF_TPL extends FPDF { +class FPDF_TPL extends MyPDF { /** * Array of Tpl-Data * @var array diff --git a/library/html2pdf/html2pdf.class.php b/library/html2pdf/html2pdf.class.php index 1c550fa7107..ef1de505a52 100644 --- a/library/html2pdf/html2pdf.class.php +++ b/library/html2pdf/html2pdf.class.php @@ -14,6 +14,7 @@ define('__CLASS_HTML2PDF__', '3.31'); require_once(dirname(__FILE__).'/_mypdf/mypdf.class.php'); // classe mypdf + require_once(dirname(__FILE__).'/fpdi/fpdi.php'); // Added by Rod require_once(dirname(__FILE__).'/parsingHTML.class.php'); // classe de parsing HTML require_once(dirname(__FILE__).'/styleHTML.class.php'); // classe de gestion des styles @@ -116,7 +117,7 @@ function HTML2PDF($sens = 'P', $format = 'A4', $langue='fr', $marges = array(5, HTML2PDF::textLOAD($this->langue); // création de l' objet PDF - $this->pdf = new MyPDF($sens, 'mm', $format); + $this->pdf = new FPDI($sens, 'mm', $format); // initialisation des styles $this->style = new styleHTML($this->pdf); @@ -215,6 +216,7 @@ function DEBUG_stepline($nom, $val1, $val2, $val3, $val4) /** * renseigner l'encoding à utiliser + * * @param string nouvel encoding * @return string ancien encoding @@ -4699,6 +4701,7 @@ function o_TD($param, $other = 'td') $HTML2PDF_TABLEAU[$param['num']]['corr'] [$HTML2PDF_TABLEAU[$param['num']]['corr_y']+$j] [$HTML2PDF_TABLEAU[$param['num']]['corr_x']+$i] = ($i+$j>0) ? '' : array($x,$y,$colspan,$rowspan); + } } $HTML2PDF_TABLEAU[$param['num']]['corr_x']+= $colspan; @@ -5971,6 +5974,7 @@ function INDEX_NewPage(&$page) else { $this->setNewPage(); + return null; } }