"Σφάλμα κλήσης!", 'message' => "
Η διαδικασία έχει κληθεί με λάθος τρόπο ή μέθοδο.
Αν έχετε φτάσει σε αυτή τη σελίδα χρησιμοποιώντας μια αυτοματοποιημένη εργασία, παρακαλώ επικοινωνήστε με τον διαχειριστή της εφαρμογής.
" ); include("includes/ui-message.php"); die(); } // Include the main TCPDF library (search for installation path). require_once('library/TCPDF/tcpdf.php'); // Extend the TCPDF class to create custom Header and Footer class MYPDF extends TCPDF { //Page header public function Header() { // Logo // $image_file = K_PATH_IMAGES.'logo_example.jpg'; // $this->Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false); // Set font $this->SetFont('ubuntuv14400', '', 9); // Title $this->Cell(0, 15, HEADER_TEXT, 0, false, 'R', 0, '', 0, false, 'M', 'M'); } // Page footer public function Footer() { // Position at 15 mm from bottom $this->SetY(-15); // Set font $this->SetFont('ubuntuv14400', '', 9); // Page number // $this->Cell(0, 15, '— '.$this->getAliasNumPage().' /'.$this->getAliasNbPages().' —', 0, false, 'C', 0, '', 0, false, 'T', 'M'); $this->Cell(0, 15, '— '.$this->getAliasNumPage().' —', 0, false, 'C', 0, '', 0, false, 'T', 'M'); } } // 02. // Start PDF document ---------------------------------------------------------- // new object // set attributes // set defaults (fonts, sizes, margins, etc) // draw cover-page //////////////////////////////////////////////////////////////////////////////// // create new PDF document if (PRINT_MODE == 'page') $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); else $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // set document information // ----------------------------------------------------------------------------- $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle('Kallasha Project'); $pdf->SetSubject('Kallasha items'); $pdf->SetKeywords('Kallasha, File, Tradition'); // Construct Fonts (need only once; then font files are saved into fonts folder) // $Ubuntu400font = TCPDF_FONTS::addTTFfont(dirname(__FILE__).'/library/TCPDF/fonts/pi-fonts/ubuntu-v14-400.ttf', 'TrueTypeUnicode', '', 32); // $Ubuntu700font = TCPDF_FONTS::addTTFfont(dirname(__FILE__).'/library/TCPDF/fonts/pi-fonts/ubuntu-v14-700.ttf', 'TrueTypeUnicode', '', 32); // if PAGE mode, remove default header/footer // ----------------------------------------------------------------------------- if (PRINT_MODE == 'page') { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // set some language-dependent strings (optional) // if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { // require_once(dirname(__FILE__).'/lang/eng.php'); // $pdf->setLanguageArray($l); // } $tagvs = array('h1' => array(0 => array('h' => 1, 'n' => 3), 1 => array('h' => 1, 'n' => 2)), 'h2' => array(0 => array('h' => 1, 'n' => 2), 1 => array('h' => 1, 'n' => 1)), 'h3' => array(0 => array('h' => 1, 'n' => 2), 1 => array('h' => 1, 'n' => 1)) ); $pdf->setHtmlVSpace($tagvs); // draw cover page // ----------------------------------------------------------------------------- if (RENDER_COVER) { $pdf->AddPage(); $pdf->SetFont('ubuntuv14400', '', 44, '', false); $pdf->SetY(150); $html = ''. COVER_CITY .', '. local_dt(time()) .'
'; $pdf->writeHTML($html, true, false, true, false, ''); } // test page // $pdf->AddPage(); // $pdf->SetFont('ubuntuv14400', '', 8, '', false); // $pdf->writeHTML((print_r($items, true)), true, false, true, false, ''); // 03. // render each item ------------------------------------------------------------ // parse sections, fields, values // handle special fields //////////////////////////////////////////////////////////////////////////////// // set font $pdf->SetFont('ubuntuv14400', '', 9.5, '', false); foreach ($items as $ki => $val) { // add a page $pdf->AddPage(); $text = ''; foreach ($formARRAY as $ks => $sect) { $text .= '| '. $text .' | | | '. $image .' |