+ $this->TCPDF($pageOrientation, 'pt', $pageSize);//, $uni, $enc);
+ $this->SetLang($lang);
+ $this->setPrintHeader(false);
+ $this->setPrintFooter(false);
+ $this->setPDFVersion("1.3");
+ $this->setAutoPageBreak(0);
+ $this->SetLineWidth(1);
+ $this->cMargin = 0;
+ }
+ /*
+ Set lamguage for next report
+ */
+ function SetLang($code=null)
+ {
+ global $installed_languages, $dflt_lang, $path_to_root;
+
+ if (!$code)
+ $code = $dflt_lang;
+
+ $lang = array_search_value($code, $installed_languages, 'code');
+ $_SESSION['get_text']->set_language($lang['code'], strtoupper($lang['encoding']));
+ $_SESSION['get_text']->add_domain($lang['code'], $path_to_root . "/lang");
+
+ // re-read translated sys names.
+ include($path_to_root.'/includes/sysnames.inc');
+
+ $l = array('a_meta_charset' => strtoupper($lang['encoding']),
+ 'a_meta_dir' => @$lang['rtl'] ? 'rtl' : 'ltr',
+ 'a_meta_language' => $code, 'w_page' => 'page');
+