From 22b292f5e6d24d863bc01f2f1915922f517c27a4 Mon Sep 17 00:00:00 2001 From: tekknogenius Date: Sat, 16 Jul 2005 15:08:44 +0000 Subject: [PATCH] configurable paper size and margins via config.php --- controllers/C_Prescription.class.php | 11 ++++++++--- includes/config.php | 20 +++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/controllers/C_Prescription.class.php b/controllers/C_Prescription.class.php index 48e5068f9..3923cf9c5 100644 --- a/controllers/C_Prescription.class.php +++ b/controllers/C_Prescription.class.php @@ -159,8 +159,13 @@ class C_Prescription extends Controller { function _print_prescription($p, & $toFile) { require_once ($GLOBALS['fileroot'] . "/library/classes/class.ezpdf.php"); - $pdf =& new Cezpdf("LETTER"); - $pdf->ezSetMargins(72,30,50,30); + $pdf =& new Cezpdf($GLOBALS['oer_config']['prescriptions']['paper_size']); + $pdf->ezSetMargins($GLOBALS['oer_config']['prescriptions']['top'] + ,$GLOBALS['oer_config']['prescriptions']['bottom'] + ,$GLOBALS['oer_config']['prescriptions']['left'] + ,$GLOBALS['oer_config']['prescriptions']['right'] + ); + $pdf->selectFont($GLOBALS['fileroot'] . "/library/fonts/Helvetica.afm"); if(!empty($this->pconfig['logo'])) { @@ -297,4 +302,4 @@ class C_Prescription extends Controller { } } -?> +?> \ No newline at end of file diff --git a/includes/config.php b/includes/config.php index 926f35fdf..35f5be55c 100644 --- a/includes/config.php +++ b/includes/config.php @@ -39,14 +39,27 @@ $GLOBALS['oer_config']['prescriptions']['sendfax'] = ''; // i.e. 9, will dial 9 for external tone, and wait a second. $GLOBALS['oer_config']['prescriptions']['prefix'] = ''; +// select paper size for prescription printing +// see library/classes/class.ezpdf.php for complete list of paper sizes +// ex. "LETTER", "A4", "LEGAL" ... +$GLOBALS['oer_config']['prescriptions']['paper_size'] = "LETTER"; + +// change page margins for prescription printing +// note, values are in pixels (72 dots per inch) +// to convert from centimeters use the following: (centimeters / 2.54 ) * 72; +$GLOBALS['oer_config']['prescriptions']['left'] = 30; +$GLOBALS['oer_config']['prescriptions']['right'] = 30; +$GLOBALS['oer_config']['prescriptions']['top'] = 72; +$GLOBALS['oer_config']['prescriptions']['bottom'] = 30; + //accounting system web services integration //whether to use the system -$GLOBALS['oer_config']['ws_accounting']['enabled'] = false; +$GLOBALS['oer_config']['ws_accounting']['enabled'] = true; $GLOBALS['oer_config']['ws_accounting']['server'] = "localhost"; $GLOBALS['oer_config']['ws_accounting']['port'] = "80"; $GLOBALS['oer_config']['ws_accounting']['url'] = "/sql-ledger/ws_server.pl"; -$GLOBALS['oer_config']['ws_accounting']['username'] = "admin"; -$GLOBALS['oer_config']['ws_accounting']['password'] = "12345"; +$GLOBALS['oer_config']['ws_accounting']['username'] = "openemr"; +$GLOBALS['oer_config']['ws_accounting']['password'] = "MFP**123"; $GLOBALS['oer_config']['ws_accounting']['url_path'] = "http://" . $_SERVER["SERVER_NAME"] . "/sql-ledger/login.pl"; $GLOBALS['oer_config']['ws_accounting']['income_acct'] = "10035"; @@ -55,6 +68,7 @@ $GLOBALS['oer_config']['ws_accounting']['income_acct'] = "10035"; $GLOBALS['oer_config']['prescriptions']['logo'] = dirname(__FILE__) ."/../interface/pic/" . $GLOBALS['oer_config']['prescriptions']['logo_pic']; $GLOBALS['oer_config']['prescriptions']['signature'] = dirname(__FILE__) ."/../interface/pic/" . $GLOBALS['oer_config']['prescriptions']['sig_pic']; +$GLOBALS['oer_config']['prescriptions']['signature'] = ''; if (strpos($GLOBALS['oer_config']['documents']['repository'],"/") !== 0) { $GLOBALS['oer_config']['documents']['repository'] = realpath(dirname(__FILE__) . "/../" . $GLOBALS['oer_config']['documents']['repository']) . "/"; -- 2.11.4.GIT