Пример #1
0
 public function generateCodes(array $data)
 {
     $count = (int) $data['count'];
     $teacherId = $data['teacher_id'];
     $message = $data['message'];
     if (is_null($count) || is_null($teacherId)) {
         return false;
     } else {
         try {
             \DB::beginTransaction();
             $teacher = Authenticator::user($teacherId);
             \PDF::setPrintHeader(false);
             \PDF::setPrintFooter(false);
             \PDF::AddPage();
             for ($i = 0; $i < $count; $i++) {
                 $code = $this->codeRepo->generateCode();
                 $data = array();
                 $data = array_add($data, 'student_code', $code);
                 $data = array_add($data, 'teacher_id', $teacherId);
                 $code = $this->codeRepo->create($data);
                 $code->message = $message;
                 $this->codeRepo->clearModel();
                 $html = View::make('pages.code')->with('code', $code)->render();
                 if ($i % 5 === 0 && $i !== 0) {
                     \PDF::AddPage();
                     \PDF::writeHTML($html, false, false, false, false, 'L');
                 } else {
                     \PDF::writeHTML($html, false, false, false, false, 'L');
                 }
             }
             \PDF::SetCreator('');
             \PDF::SetAuthor('');
             $format = '%s/%s.pdf';
             $subpath = sprintf($format, 'pdfs', $teacherId);
             $format = '/%s/%s';
             $fullpath = sprintf($format, public_path(), $subpath);
             \PDF::Output($fullpath, 'F');
             \DB::commit();
             return $subpath;
         } catch (\Exception $ex) {
             \Log::error($ex);
             \DB::rollback();
             return false;
         }
     }
 }
Пример #2
0
 /**
  * PDF Setup - WT_Report_PDF
  */
 function setup()
 {
     parent::setup();
     // Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
     $this->pdf = new PDF($this->orientation, parent::unit, array($this->pagew, $this->pageh), self::unicode, "UTF-8", self::diskcache);
     // Setup the PDF margins
     $this->pdf->setMargins($this->leftmargin, $this->topmargin, $this->rightmargin);
     $this->pdf->SetHeaderMargin($this->headermargin);
     $this->pdf->SetFooterMargin($this->footermargin);
     //Set auto page breaks
     $this->pdf->SetAutoPageBreak(true, $this->bottommargin);
     // Set font subsetting
     $this->pdf->setFontSubsetting(self::subsetting);
     // Setup PDF compression
     $this->pdf->SetCompression(self::compression);
     // Setup RTL support
     $this->pdf->setRTL($this->rtl);
     // Set the document information
     // Only admin should see the version number
     $appversion = WT_WEBTREES;
     if (Auth::isAdmin()) {
         $appversion .= " " . WT_VERSION;
     }
     $this->pdf->SetCreator($appversion . " (" . parent::wt_url . ")");
     // Not implemented yet - WT_Report_Base::setup()
     $this->pdf->SetAuthor($this->rauthor);
     $this->pdf->SetTitle($this->title);
     $this->pdf->SetSubject($this->rsubject);
     $this->pdf->SetKeywords($this->rkeywords);
     $this->pdf->setReport($this);
     if ($this->showGenText) {
         // The default style name for Generated by.... is 'genby'
         $element = new CellPDF(0, 10, 0, "C", "", "genby", 1, ".", ".", 0, 0, "", "", true);
         $element->addText($this->generatedby);
         $element->setUrl(parent::wt_url);
         $this->pdf->addFooter($element);
     }
 }
 function createPDF($ignoreStockStatusDepot = false, $output = 'D', $add_to_daily_statistic = false, $print_per_orders = true)
 {
     /*
         OUTPUT : D -> WILL PRODUCE ONE PDF FOR ALL ORDERS WITH ITEMS IN IT
         OUTPUT : F -> WILL PRODUCE MULTI PDF PER ORDER ITEMS
     */
     global $class_jo, $class_o, $class_do;
     $pi_printed_jg = array();
     $pi_printed_sp = array();
     $pi_printed_dp = array();
     if ($output == 'D') {
         //PRODUCE SINGLE PDF FILE
         $pdf = new PDF('P', 'mm', 'A4');
         $pdf->setTitle('Production Instruction');
         $pdf->SetAuthor('JULIE GRACE / Bonofactum');
         $pdf->SetCreator('k-Auto Generated PDF');
         $pdf->SetDisplayMode('real');
         $pdf->SetAutoPageBreak(false);
         $pdf->AliasNbPages();
         $pdf->SetFillColor(191, 191, 191);
     }
     $item_printed = 0;
     $oiid_last_printed = '';
     /* Moved this on function constructPIContent and replace using below $print_per_orders, 
      * so eventhough we use $output='F' we still could create pi which consists of collection of orders */
     //foreach($this->orders as $order) {
     //    $o = $order['detail'];
     //    foreach($order['items'] as $oiid=>$i) {
     //        if($i['status']<8) $this->pi_printed[strtolower($o['type'])][] = $oiid;
     //        //if($i['status']<8) ${'pi_printed_'.strtolower($o['type'])}[] = $oiid;
     //        $this->constructPIContent($pdf, $output, $order, $oiid, $ignoreStockStatusDepot, $print_per_orders);
     //        $item_printed++;
     //        $oiid_last_printed = $oiid;
     //    }
     //}
     if ($print_per_orders) {
         foreach ($this->orders as $order) {
             $this->constructPIContent($pdf, $output, $order, $ignoreStockStatusDepot, true);
             $item_printed++;
         }
     } else {
         $this->constructPIContent($pdf, $output, $this->orders, $ignoreStockStatusDepot, false);
     }
     #PI Print Counter
     if (count($this->pi_printed['sp']) > 0) {
         $class_jo->printCountAdd($this->pi_printed['sp']);
     }
     if (count($this->pi_printed['jg']) > 0) {
         $class_o->printCountAdd($this->pi_printed['jg']);
     }
     if (count($this->pi_printed['dp']) > 0) {
         $class_do->printCountAdd($this->pi_printed['dp']);
     }
     /* D: Download; F: Save File on Server */
     if ($output == 'D') {
         $infix = '';
         //$infix = count($this->orders)>1 ? '' : strtoupper($o['type']).'O'.$o['id'].'-';
         //if($item_printed==1) $infix = strtoupper($o['type']).'-'.$oiid_last_printed.'-';
         if ($item_printed == 1) {
             $infix = array_keys($this->orders);
             $infix = $infix[0] . '-';
         }
         $filename = 'PI-' . $infix . date('YmdHi');
         $pdf->Output($filename . '.pdf', $output);
         //$pdf->Output($filename.'.pdf','D');
     }
     if ($add_to_daily_statistic) {
         $pt = new production_target();
         $timestamp = date('Y-m-d H:i:s');
         if ($this->qty_total_first_printed > 0) {
             $pt->addDataToField($timestamp, 'start', $this->qty_total_first_printed);
         }
     }
 }
Пример #4
0
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/header_print.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_pdf.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
extract($_GET);
$ret = "";
$Form = new Acc_Report($cn, $form_id);
$Libelle = sprintf("%s ", $Form->get_name());
$pdf = new PDF($cn);
$pdf->setDossierInfo($Libelle);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Rapport " . $Libelle, true);
// Step ??
//--
$step = HtmlInput::default_value_get("p_step", 0);
if ($step == 0) {
    // No step asked
    //--
    if ($_GET['type_periode'] == 0) {
        $array = $Form->get_row($_GET['from_periode'], $_GET['to_periode'], $_GET['type_periode']);
    } else {
        $array = $Form->get_row($_GET['from_date'], $_GET['to_date'], $_GET['type_periode']);
    }
} else {
    // yes with step
    //--
Пример #5
0
    }
    function ChapterBody($file)
    {
        //Read text file
        $f = fopen($file, 'r');
        $txt = fread($f, filesize($file));
        fclose($f);
        //Times 12
        $this->SetFont('Times', '', 12);
        //Output justified text
        $this->MultiCell(0, 5, $txt);
        //Line break
        $this->Ln();
        //Mention in italics
        $this->SetFont('', 'I');
        $this->Cell(0, 5, '(end of excerpt)');
    }
    function PrintChapter($num, $title, $file)
    {
        $this->AddPage();
        $this->ChapterTitle($num, $title);
        $this->ChapterBody($file);
    }
}
$pdf = new PDF();
$title = '20000 Leagues Under the Seas';
$pdf->SetTitle($title);
$pdf->SetAuthor('Jules Verne');
$pdf->PrintChapter(1, 'A RUNAWAY REEF', '20k_c1.txt');
$pdf->PrintChapter(2, 'THE PROS AND CONS', '20k_c2.txt');
$pdf->Output();
Пример #6
0
        // Salto de l�nea
        $this->Ln(4);
    }
    function ChapterBody($file)
    {
        // Leemos el fichero
        $txt = file_get_contents($file);
        // Times 12
        $this->SetFont('Times', '', 12);
        // Imprimimos el texto justificado
        $this->MultiCell(0, 5, $txt);
        // Salto de l�nea
        $this->Ln();
        // Cita en it�lica
        $this->SetFont('', 'I');
        $this->Cell(0, 5, '(fin del extracto)');
    }
    function PrintChapter($num, $title, $file)
    {
        $this->AddPage();
        $this->ChapterTitle($num, $title);
        $this->ChapterBody($file);
    }
}
$pdf = new PDF();
$title = '20000 Leguas de Viaje Submarino';
$pdf->SetTitle($title);
$pdf->SetAuthor('Julio Verne');
$pdf->PrintChapter(1, 'UN RIZO DE HUIDA', '20k_c1.txt');
$pdf->PrintChapter(2, 'LOS PROS Y LOS CONTRAS', '20k_c2.txt');
$pdf->Output();
Пример #7
0
<?php

$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
$clues = explode(',', $_POST['clues']);
require 'MultiCellBlt2.php';
//Create pdf
$pdf = new PDF();
$pdf->AddPage();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
// Set the page break to 'true' and the bottom margin height
$pdf->SetAutoPageBreak(1, 10);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//insert Collage logo
$pdf->Image('logo.png', 10, 10, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 15);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 11, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(65, 30);
$pdf->SetLeftMargin(65);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
Пример #8
0
}
$pdf = new PDF($currentCategory, $thema, $tree->categoryName, $orientation = "P", $unit = "mm", $format = "A4");
$pdf->Open();
$pdf->SetAutoPageBreak(true, 2 * (40 / $pdf->k));
$pdf->SetTitle($thema);
$pdf->SetCreator($PMF_CONF["title"]);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont("Arial", "", 12);
$pdf->SetDisplayMode("real");
$pdf->WriteHTML(str_replace("../", "", $content));
$pdf->Ln();
$pdf->Ln();
$pdf->SetStyle('I', true);
$pdf->Write(5, unhtmlentities($PMF_LANG['ad_entry_solution_id']) . ': #' . $solution_id);
$pdf->SetAuthor($author);
$pdf->Ln();
$pdf->Write(5, unhtmlentities($PMF_LANG["msgAuthor"]) . $author);
$pdf->SetAuthor($author);
$pdf->Ln();
$pdf->Write(5, unhtmlentities($PMF_LANG["msgLastUpdateArticle"]) . makeDate($date));
$pdf->SetStyle('I', false);
$pdfFile = "pdf/" . $id . ".pdf";
$pdf->Output($pdfFile);
$file = basename($pdfFile);
$size = filesize($pdfFile);
session_cache_limiter('private');
header("Pragma: public");
header("Expires: 0");
// set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
Пример #9
0
  } */
//This is an example of how to get custom questions for an attendee
//Get the questions for the attendee
/* $q_sql = "SELECT ea.answer, eq.question
  FROM " . EVENTS_ANSWER_TABLE . " ea
  LEFT JOIN " . EVENTS_QUESTION_TABLE . " eq ON eq.id = ea.question_id
  WHERE ea.registration_id = '".$registration_id."'";
  $q_sql .= " AND ea.question_id = '9' ";
  $q_sql .= " ORDER BY eq.sequence asc ";
  $wpdb->get_results($q_sql);

  $organization_name = $wpdb->last_result[0]->answer;//question_id = '9' */
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->SetAuthor(pdftext($org_options['organization']));
if (isset($invoice_payment_settings['pdf_title'])) {
    $pdf->SetTitle(pdftext($event_name . ' - ' . $invoice_payment_settings['pdf_title']));
} else {
    $pdf->SetTitle(pdftext($event_name));
}
//$pdf->SetAutoPageBreak('auto');
$pdf->AddPage();
//Create the top right of invoice below header
$pdf->SetFont('Times', '', 12);
$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date(get_option('date_format')), 0, 1, 'R');
//Set invoice date
$pdf->Cell(180, 10, __('Primary Attendee ID: ', 'event_espresso') . $attendee_id, 0, 0, 'R');
//Set Invoice number
$pdf->Ln(0);
//Set the top left of invoice below header
/**
 * 
 * @global array $DIAMOND_BRAND_IDS
 * @global string $server
 * @global jng_sp $class_sp
 * @global products_minierp $class_pm
 * @global logger $logger
 * @global string $icon_diamond
 * @global string $icon_gold_585_w
 * @global string $icon_gold_585_g
 * @param string $timestamp
 * @param int $jng_sp_id
 * @return boolean
 */
function generateReports($timestamp, $jng_sp_id)
{
    global $DIAMOND_BRAND_IDS, $server, $class_sp, $class_pm, $logger, $icon_diamond, $icon_gold_585_w, $icon_gold_585_g;
    $log_date = strtotime($timestamp);
    $sp_detail = $jng_sp_id > 0 ? $class_sp->retrieveDetail($jng_sp_id) : array('package_prefix' => 'JG.DE');
    $filter_sold = 1;
    $filter_age = 56;
    $logger->write("GENERATING REPORT {$sp_detail['package_prefix']}");
    /*
     * Query get new products which:
     * 1) age <= 8 weeks (56 days)
     * 2) total sold >= 1
     */
    $q = "SELECT p.products_id, p.products_model, p.products_image, p.products_price, p.material_expenses, p.stars ";
    $q .= " , ptc.categories_id AS catid, cd.categories_name";
    $q .= " , IFNULL(plps.sold_monthly_1, 0) AS sold_monthly_1, IFNULL(plps.sold_monthly_2, 0) AS sold_monthly_2";
    if ($jng_sp_id > 0) {
        $q .= " , ((jc.total_returned / jc.total_sold) * 100) AS returned_rate, jc.active_age";
    } else {
        $q .= " , 'N/A' AS returned_rate, DATEDIFF(NOW(), p.products_date_added) AS active_age";
    }
    $q .= " FROM products p";
    if ($jng_sp_id > 0) {
        $q .= " INNER JOIN jng_sp_catalog jc ON jc.jng_sp_id = {$jng_sp_id} AND jc.products_id = p.products_id";
    } else {
        $q .= " INNER JOIN orders_products op ON op.products_id = p.products_id";
    }
    $q .= " LEFT JOIN products_log_per_sp plps ON plps.products_id = p.products_id AND plps.jng_sp_id = {$jng_sp_id}";
    $q .= " LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id";
    $q .= " LEFT JOIN categories_description cd ON cd.categories_id = ptc.categories_id AND cd.language_id = 1";
    $q .= " WHERE";
    if ($jng_sp_id > 0) {
        $q .= " jc.active_age <= {$filter_age}";
        $q .= " AND jc.active_status = 1";
        $q .= " AND total_sold >= {$filter_sold}";
    } else {
        //$q .= " p.products_date_added >= '2013-01-01 00:00:00'";
        $q .= " DATEDIFF(NOW(), p.products_date_added) <= {$filter_age}";
        $q .= " AND p.products_status = 1";
        $q .= " AND op.status NOT IN (10, 12)";
        $q .= " GROUP BY p.products_id";
        $q .= " HAVING SUM(op.products_quantity) >= {$filter_sold}";
    }
    //$q .= " LIMIT 5";
    $dbq = tep_db_query($q);
    $products = array();
    while ($row = tep_db_fetch_array($dbq)) {
        $row['margin'] = $class_pm->calculateMargin($row['products_price'], $row['material_expenses'], 1);
        $products[$row['catid']][$row['products_id']] = $row;
    }
    if (count($products) == 0) {
        $logger->write("NO DATA RETRIEVED");
        return false;
    }
    //Start Creating PDF Reports
    $margin = 20;
    $ypos = 10;
    $col_width = 48;
    $col_height = 77;
    $line_height = 5;
    $cell_text_width = $col_width - 3;
    $no = 0;
    $row = 1;
    $icon_w = 4;
    $icon_h = 4;
    $first_page = true;
    $pdf = new PDF('P', 'mm', 'A4');
    $pdf->setTitle('New Comer Report');
    $pdf->SetAuthor('JULIE GRACE');
    $pdf->SetCreator('Manobo PDF Generator');
    $pdf->SetDisplayMode('real');
    $pdf->SetAutoPageBreak(true, 25);
    $pdf->AliasNbPages();
    $pdf->AddPage('L');
    $pdf->setXY($margin, $ypos);
    $pdf->setFont('Arial', 'B', '14');
    $pdf->cell(240, 5, 'SALES REPORT NEWCOMER PRODUCT ' . $sp_detail['package_prefix'] . ' (' . date('d.m.Y', $log_date) . ')', 0, 0, 'C');
    $pdf->setFont('Arial', '', '10');
    $ypos += 15;
    $pdf->setXY($margin, $ypos);
    $catids = load_config('products-categories-sorting');
    foreach ($catids as $catid) {
        $xpos = $margin;
        if (is_array($products[$catid])) {
            foreach ($products[$catid] as $pid => $p) {
                $obj_product = new product($pid);
                $no++;
                if ($ypos >= 150 || $no == 1 && !$first_page) {
                    //Reset vars to new page state
                    $xpos = $margin;
                    $ypos = 25;
                    $row = 1;
                    $pdf->AddPage('L');
                    $pdf->setXY($margin, $ypos);
                }
                //Draw product box
                $pdf->Cell($col_width, $col_height, '', 1, 0);
                //Start drawing contents
                $pdf->drawProductsImage($xpos + 10, $ypos + 1, $p['products_image']);
                if (is_object($obj_product) && in_array($obj_product->brand_id, $DIAMOND_BRAND_IDS)) {
                    $ypos_icon = $ypos + 3;
                    $pdf->drawIcon($icon_diamond, $xpos + 39.5, $ypos_icon, $icon_w, $icon_h);
                }
                if (is_object($obj_product) && ($obj_product->metal_stamp_code > 0 && $obj_product->metal_stamp_code != 925)) {
                    $icon_gold_selected = "icon_gold_" . $obj_product->metal_stamp_code . '_' . strtolower(substr($obj_product->metal_stamp_info, 0, 1));
                    $icon_gold = ${$icon_gold_selected};
                    $ypos_icon += $icon_h;
                    //gold icon dimension is 21 x 16
                    $icon_gold_w = 21 / 16 * $icon_h;
                    $pdf->drawIcon($icon_gold, $xpos + 38, $ypos_icon, $icon_gold_w, $icon_h);
                }
                $pdf->setXY($xpos + 2, $ypos + 3);
                $pdf->setFont('Arial', 'B', '10');
                $pdf->Cell($col_width, $line_height, $no . ". " . ($no == 1 ? $p['categories_name'] : ''));
                $pdf->setFont('Arial', '', '10');
                $pdf->drawStar($p['stars'], $xpos + 15, $ypos + 29);
                $pdf->setXY($xpos + 2, $ypos + 35);
                $link = "http://{$server}/?open=product-detail&products_id=" . $pid;
                $pdf->SetFont('Arial', 'U');
                $pdf->SetTextColor(0, 0, 255);
                $pdf->Cell($cell_text_width, $line_height, $pid . ' / ' . $p['products_model'], 0, 0, 'C', 0, $link);
                $pdf->SetFont('Arial', '');
                $pdf->SetTextColor(0, 0, 0);
                $pdf->setXY($xpos + 2, $ypos + 40);
                $pdf->Cell($cell_text_width, $line_height, 'Price: ' . displayCurrency('EUR', $p['products_price'], false) . ' EUR', 0, 0, 'C');
                $pdf->setXY($xpos + 2, $ypos + 45);
                $pdf->Cell($cell_text_width, $line_height, 'Margin: ' . number_format($p['margin'], 1) . '%', 0, 0, 'C');
                $pdf->setXY($xpos + 2, $ypos + 50);
                $pdf->Cell($cell_text_width, $line_height, 'Return Rate: ' . ($jng_sp_id > 0 ? number_format($p['returned_rate'], 1) . '%' : $p['returned_rate']), 0, 0, 'C');
                $pdf->setXY($xpos + 2, $ypos + 60);
                $pdf->Cell($cell_text_width, $line_height, 'Age in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['active_age'] . ' days', 0, 0, 'C');
                $pdf->setXY($xpos + 2, $ypos + 65);
                $pdf->Cell($cell_text_width, $line_height, 'Sold L30D in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['sold_monthly_1'], 0, 0, 'C');
                $pdf->setXY($xpos + 2, $ypos + 70);
                $pdf->Cell($cell_text_width, $line_height, 'Sold L60D in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['sold_monthly_2'], 0, 0, 'C');
                if ($no % 5 == 0) {
                    $row++;
                    $xpos = $margin;
                    $ypos += $col_height * ($row - 1) + 5;
                } else {
                    $xpos += $col_width + 5;
                }
                $pdf->setXY($xpos, $ypos);
            }
            $first_page = false;
        }
        $no = 0;
    }
    $filepath = 'sales-report-newcomer-products/';
    $yeardir = $filepath . date('Y/', $log_date);
    if (!file_exists(DIR_FS_ARCHIVES . $yeardir) || !is_dir(DIR_FS_ARCHIVES . $yeardir)) {
        mkdir(DIR_FS_ARCHIVES . $yeardir);
    }
    $monthdir = $yeardir . date('m/', $log_date);
    if (!file_exists(DIR_FS_ARCHIVES . $monthdir) || !is_dir(DIR_FS_ARCHIVES . $monthdir)) {
        mkdir(DIR_FS_ARCHIVES . $monthdir);
    }
    $path_location = DIR_FS_ARCHIVES . $monthdir;
    $filename = date('YmdHi', strtotime($timestamp)) . '-sales-report-newcomer-products-' . $sp_detail['package_prefix'] . '.pdf';
    $pdf->Output($path_location . $filename, 'F');
    $logger->write("PDF CREATED: {$filename}");
    //$pdf->Output($filename, 'D');
    return true;
}
Пример #11
0
        $ruta_raiz = "..";
        include "{$ruta_raiz}/fpdf/html2pdf.php";
        $fecha = date("d-m-Y");
        $fecha_hoy_corto = date("d-m-Y");
        include "{$ruta_raiz}/class_control/class_gen.php";
        $b = new CLASS_GEN();
        $date = date("m/d/Y");
        $fecha_hoy = $b->traducefecha($date);
        $html = "<table width='100%' align='left'><tr><td></td></tr><tr><td colspan=3 >&nbsp;&nbsp; &nbsp;&nbsp;</td><td align='left'><b>" . strtoupper($ent) . "</b></td></tr></table>\n\t\t<p><p>\n\t\t<br><br><br>\n\t\t<b><center> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;\n\t\t&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;\n\t\tACTA DE ANULACI&Oacute;N No.  {$actaNo} </center></b><p><br>\n\t\t<CENTER><B>\n\t\t&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;\n\t\tNUMEROS DE RADICACI&Oacute;N DE CORRESPONDENCIA ENVIADA A&Ntilde;O {$anoActual}</B></CENTER><p>\n\t\t<CENTER><B>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;\n\t\t&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;\n\t\tGESTI&Oacute;N DOCUMENTAL Y ARCHIVO </B></CENTER><p>\n\t\t<br>\n        <p text-align:justify; padding:3px >\n\t\tEn cumplimiento a lo establecido en el Acuerdo No. 060 del 30 de octubre de 2001 expedido por    el Archivo General de la Naci&oacute;n,   en  el cual se establecen pautas para la administraci&oacute;n de  las      comunicaciones  oficiales en las entidades p&uacute;blicas y privadas que cumplen  funciones p&uacute;blicas,       y  con  base especialmente en  el par&aacute;grafo del Art&iacute;culo  Quinto,  el  cual  establece  que cuando      existan  errores en la radicaci&oacute;n y se anulen los n&uacute;meros, se  debe dejar  constancia por escrito,       con la respectiva justificaci&oacute;n y firma del Jefe de  la unidad  de  correspondencia; el  coordinador      de Gesti&oacute;n Documental y Correspondencia de {$entidad}  procede a anular los siguientes n&uacute;meros de      radicación de {$TituloActam} que no fueron tramitados por las dependencias radicadoras:\n        </p><br><br><br><br>\n\t\t1.- N&uacute;meros de radicaci&oacute;n de {$TituloActam} a anular: <br>\n\t\t     {$radicadosPdf}\n\t\t<br><br>\n\t\t2.- Se deja  copia  de la presente acta en el archivo central de la  Entidad  para  el tr&aacute;mite <br>\n\t\t     respectivo de la organizaci&oacute;n f&iacute;sica de los archivos.<p>\n\t\tSe firma la presente el {$fecha_hoy}\n\t\t<p><p>\t\n\t\t______________________________________________________ <br>\n\t\t" . iconv($odt->codificacion($usua_nomb), 'ISO-8859-1', $usua_nomb) . "<BR>\nCentro de Administraci&oacute;n Documental";
        $ruta_raiz = "..";
        $pdf = new PDF();
        $pdf->Open();
        $pdf->SetCreator("HTML2PDF");
        $pdf->SetTitle("Acta de Anulacion de Radicados");
        $pdf->SetSubject("Anulacion radicados");
        $pdf->SetAuthor("Correspondencia");
        $pdf->SetFont('Arial', '', 12);
        $pdf->AddPage();
        if (ini_get('magic_quotes_gpc') == '1') {
            $html = stripslashes($html);
        }
        $pdf->WriteHTML($html);
        //save and redirect
        $noArchivo_out = "../" . $carpetaBodega . $noArchivo;
        $pdf->Output($noArchivo_out);
        ?>
      <center>Ver Acta <a href='../seguridadImagen.php?fec=<?php 
        echo base64_encode($noArchivo);
        ?>
'>Acta No <?php 
        echo $actaNo;
Пример #12
0
 /**
  * Internal function to return the cover for publishing a research
  * @param $sectionEditorSubmission SectionEditorSubmission
  * @return string path to cover created
  */
 function &_generateCover($sectionEditorSubmission)
 {
     $journal =& Request::getJournal();
     import('classes.lib.tcpdf.pdf');
     import('classes.lib.tcpdf.tcpdf');
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
     $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     // No header and footer for this document
     $pdf->SetPrintHeader(false);
     $pdf->SetPrintFooter(false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor($journal->getJournalTitle());
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, 20, PDF_MARGIN_RIGHT);
     // set auto page breaks
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     // set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     // Right now this cover page is only in english, but the english translation keys are ready
     $pdf->AddPage();
     $pdf->SetFont('dejavusans', 'B', 14);
     $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
     // Locale::translate('editor.finalReport')
     $pdf->ln();
     $pdf->ln();
     $pdf->MultiCell(0, 6, 'for', 0, 'C');
     // Locale::translate('editor.finalReport.for')
     $pdf->ln();
     $pdf->ln();
     $pdf->MultiCell(0, 6, 'Research Project', 0, 'C');
     // Locale::translate('editor.finalReport.researchProject')
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $abstract = $sectionEditorSubmission->getAbstractByLocale('en_US');
     // Right now, considering only the english language
     $pdf->SetFont('dejavusans', 'B', 16);
     $pdf->MultiCell(0, 6, $abstract->getScientificTitle(), 0, 'C');
     $pdf->ln();
     $authors = $sectionEditorSubmission->getAuthors();
     $coInvestigatorsString = (string) '';
     $pInvestigatorsString = (string) '';
     foreach ($authors as $author) {
         if (!$author->getPrimaryContact()) {
             if ($coInvestigatorsString == '') {
                 $coInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
             } else {
                 $coInvestigatorsString = $coInvestigatorsString . ', ' . $author->getFullName() . ' (' . $author->getAffiliation() . ')';
             }
         } else {
             $pInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
         }
     }
     $pdf->SetFont('dejavusans', '', 16);
     $pdf->MultiCell(0, 6, 'Principal Investigator: ' . $pInvestigatorsString, 0, 'C');
     // Locale::translate('user.role.primaryInvestigator')
     if ($coInvestigatorsString != '') {
         $pdf->MultiCell(0, 6, 'Co-Investigator(s): ' . $coInvestigatorsString, 0, 'C');
         // Locale::translate('user.role.coinvestigator')
     }
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', 'B', 16);
     $pdf->MultiCell(0, 6, $sectionEditorSubmission->getProposalId(), 0, 'C');
     $pdf->ln();
     $pdf->ln();
     $decision = $sectionEditorSubmission->getLastSectionDecision();
     $pdf->MultiCell(0, 0, date("F Y", strtotime($decision->getDateDecided())), 0, 'L', 0, 1, '', 250, true);
     $pdf->Image("public/site/images/mainlogo.png", 'C', 230, 40, '', '', false, 'C', false, 300, 'R', false, false, 0, false, false, false);
     $pdf->AddPage();
     $pdf->SetFont('dejavusans', 'B', 14);
     $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
     // Locale::translate('editor.finalReport')
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', 'B', 12);
     $pdf->MultiCell(0, 6, 'Disclaimer', 0, 'C');
     // Locale::translate('editor.finalReport.disclaimer')
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', '', 11);
     $pdf->writeHTMLCell(0, 6, '', '', $journal->getSetting('reportDisclaimer'), 0, 0, false, true, 'J');
     $filePath = Config::getVar('files', 'files_dir') . '/articles/' . $sectionEditorSubmission->getArticleId() . '/public/';
     if (!FileManager::fileExists($filePath, 'dir')) {
         FileManager::mkdirtree($filePath);
     }
     $pdf->Output($filePath . 'tempCover.pdf', 'F');
     return $filePath;
 }
Пример #13
0
 function savePdf()
 {
     $meeting =& $this->meeting;
     $meetingAttendanceDao =& DAORegistry::getDAO("MeetingAttendanceDAO");
     $meetingAttendances =& $meetingAttendanceDao->getMeetingAttendancesByMeetingId($meeting->getId());
     $suppGuestNames = $this->getData("suppGuestName");
     $suppGuestAffiliations = $this->getData("suppGuestAffiliation");
     $meetingDateTime = date("d F Y g:ia", strtotime($meeting->getDate()));
     $meetingDate = date("d F Y", strtotime($meeting->getDate()));
     $details = Locale::translate('editor.meeting.attendanceReport.intro1') . ' ' . $this->getData("venue") . ' ' . Locale::translate('common.date.on') . ' ' . $meetingDateTime . ' ' . Locale::translate('editor.meeting.attendanceReport.intro2') . ' ' . $this->quorum . ' ' . Locale::translate('editor.meeting.attendanceReport.intro3') . ' ' . $this->getData('adjourned') . ".";
     $journal = Request::getJournal();
     $user = Request::getUser();
     import('classes.lib.tcpdf.pdf');
     $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor($user->getFullName());
     $pdf->SetTitle($journal->getJournalTitle());
     $pdf->SetSubject($meeting->getPublicId() . ' - ' . Locale::translate('editor.minutes.attendance'));
     // set default header data
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', PDF_HEADER_STRING);
     // set header and footer fonts
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     // set default monospaced font
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, 58, 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);
     $pdf->AddPage();
     $pdf->SetFont('dejavusans', 'B', 13);
     $sectionDao =& DAORegistry::getDAO("SectionDAO");
     $erc =& $sectionDao->getSection($meeting->getUploader());
     $pdf->SetFont('dejavusans', 'I', 13);
     $pdf->MultiCell(0, 6, $erc->getSectionTitle(), 0, 'C');
     $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.meetingDate') . ' ' . $meetingDate, 0, 'C');
     $pdf->ln();
     $memberCount = 0;
     $pdf->SetFont('dejavusans', 'BU', 12);
     $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.membersPresent'), 0, 'L');
     $pdf->ln();
     $pdf->SetFont('dejavusans', '', 12);
     foreach ($meetingAttendances as $meetingAttendance) {
         if ($meetingAttendance->getWasPresent() == 1) {
             $member =& $meetingAttendance->getUser();
             $pdf->MultiCell(0, 6, $member->getFullName(), 0, 'L');
             $memberCount++;
         }
     }
     if ($memberCount == 0) {
         $pdf->MultiCell(0, 6, Locale::translate('common.none'), 0, 'L');
     }
     $pdf->ln();
     $memberCount = 0;
     $pdf->SetFont('dejavusans', 'BU', 12);
     $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.membersAbsent'), 0, 'L');
     $pdf->ln();
     $pdf->SetFont('dejavusans', '', 12);
     foreach ($meetingAttendances as $meetingAttendance) {
         if ($meetingAttendance->getWasPresent() == 2) {
             $member =& $meetingAttendance->getUser();
             $pdf->MultiCell(0, 6, $member->getFullName() . ' (' . Locale::translate('editor.meeting.attendanceReport.reasonForAbsence') . ' ' . $meetingAttendance->getReasonForAbsence() . ')', 0, 'L');
             $memberCount++;
         }
     }
     if ($memberCount == 0) {
         $pdf->MultiCell(0, 6, Locale::translate('common.none'), 0, 'L');
     }
     $pdf->ln();
     if (count($suppGuestNames) > 0) {
         $suppGuestCount = 0;
         foreach ($suppGuestNames as $key => $guest) {
             if ($guest != "" && $guest != null) {
                 if ($suppGuestCount == 0) {
                     $pdf->SetFont('dejavusans', 'BU', 12);
                     $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.suppGuest'), 0, 'L');
                     $pdf->ln();
                     $pdf->SetFont('dejavusans', '', 12);
                 }
                 $pdf->MultiCell(0, 6, $guest . ' (' . $suppGuestAffiliations[$key] . ')', 0, 'L');
                 $suppGuestCount++;
             }
         }
         $pdf->ln();
     }
     $pdf->MultiCell(0, 6, $details, 0, 'L');
     $pdf->ln();
     if ($this->getData("announcements")) {
         $pdf->SetFont('dejavusans', 'BU', 12);
         $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.announcements'), 0, 'L');
         $pdf->ln();
         $pdf->SetFont('dejavusans', '', 12);
         $pdf->MultiCell(0, 6, $this->getData("announcements"), 0, 'L');
         $pdf->ln();
     }
     $pdf->SetFont('dejavusans', 'BU', 12);
     $pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.submittedBy'), 0, 'L');
     $pdf->ln();
     $pdf->SetFont('dejavusans', '', 12);
     $pdf->MultiCell(0, 6, $user->getFullName(), 0, 'L');
     $pdf->ln();
     import('classes.file.MinutesFileManager');
     $minutesFileManager = new MinutesFileManager($meeting->getId());
     $minutesFileManager->handleWrite($pdf, MINUTES_FILE_ATTENDANCE);
 }
Пример #14
0
        $this->Cell(0, 10, 'ACTA DE DENUNCIA', 0, 1, 'C');
        $this->Cell(0, 5, 'Fuerza Especial de Lucha Contra el Crimen', 0, 1, 'C');
    }
    function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('Helvetica', 'I', 10);
        //$this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C');
    }
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->SetMargins(25, 20);
$pdf->AliasNbPages();
$pdf->AddPage();
//Datos del Titulo
$pdf->SetAuthor('Aquino Romero Ramiro');
$pdf->SetTitle('2 Parcial');
$pdf->SetTextColor(0x0, 0x0, 0x0);
$pdf->SetFont("Arial", "", 9);
//$pdf->SetFontTitle("Arial","b",15);
//$pdf->Cell(0,5,'REPORTE DE '."$u",0,1,'C');
$pdf->Image('../img/escudo.png', 10, 8, 33);
$pdf->Image('../img/escudo.png', 170, 8, 33);
//Se muestra la tabla
$pdf->Ln();
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(40, 10, "Caso N*", 0, 'C');
$pdf->SetFont("Arial", "", 9);
$pdf->Cell(40, 10, "{$ID_C}", 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(40, 10, "Fecha de la Denuncia", 0, 'C');
Пример #15
0
     {
         //Position at 1.5 cm from bottom
         $this->SetY(-15);
         //Arial italic 8
         $this->SetFont('Arial', 'I', 8);
         //Page number
         //$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
         $this->SetX($this->lMargin);
         $this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
         $this->SetX($this->lMargin);
         $this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
     }
 }
 $pdf = new PDF('P');
 $pdf->AliasNbPages();
 $pdf->SetAuthor("*****@*****.**");
 $pdf->SetSubject("Party Contact");
 $pdf->SetTitle("Party Contact");
 $pdf->SetCreator("Khurram Naseem");
 $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'formatNumberDecimal' => 0, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
 $pdf->AddPage();
 foreach ($data as $vid => $d) {
     //$vehicle = $d['Rank'];
     $pdf->AddCol('party_name', '20%', '', 'L');
     $pdf->AddCol('party_address', '25%', '', 'L');
     $pdf->AddCol('Phone1', '10%', '', 'L');
     $pdf->AddCol('Phone2', '10%', '', 'L');
     $pdf->AddCol('Cell', '10%', '', 'L');
     $pdf->AddCol('contact_person', '12%', '', 'L');
     $pdf->AddCol('vehicle_name', '13%', '', 'L');
     $pdf->Table($d['data'], $prop, TRUE, FALSE);
Пример #16
0
	public function run() {
	

		$members = $this->database->loadMembersLate();
		



		for($i=0; $i < count($members); $i++){

			$sex ;
	
			if($members[$i]['SEXE'] == "Masculin")
		 		$sex = "Monsieur";
			else
			 $sex = "Madame";
		
			$nom    = $members[$i]['NOM'];
			$prenom = $members[$i]['PRENOM'];

			$file = 'file'.$i.'.txt';

			$fp = fopen($file, 'w');
		
			fwrite($fp, "\n\n$sex $nom $prenom  \n\n");
			fwrite($fp, "Voici la liste des livres que vous devez rendre: \n\n");
		
			$books   =  $this->database->loadMemberLate($members[$i]['Numero_ADHERENT']);
			
			for($j=0; $j < count($books); $j++){
				
				$id_livre	  = $books[$j]['NUMERO_EXEMPLAIRE'] ;
				$titre 		  = $books[$j]['TITRE'] ;
				$date_emprunt = $books[$j]['DATE_EMP'] ;
				$date_retour  = $books[$j]['DATE_RETOUR'] ;
				
				fwrite($fp, "Livre ID: $id_livre   Titre: $titre   date d'emprunt: $date_emprunt   date de retour prevue: $date_retour\n");

			}
		
	
			fclose($fp);

		}

		


			$pdf = new PDF();
			$titre = 'Retard';
			$pdf->SetTitle($titre);
			$pdf->SetAuthor('Bibliotheque');

			for($i=0; $i < count($members); $i++){
				$file = 'file'.$i.'.txt';
				$num = $i+1;
				$pdf->AjouterChapitre($num,'Avertissement',$file);
			}
				$pdf->Output();

  
	
		//$this->setView(getViewByName("RegisterBookForm"));
	
			
	}
 function display_pdf()
 {
     $array = $this->load();
     if (empty($array)) {
         return;
     }
     $pdf = new PDF($this->db);
     $pdf->Setdossierinfo(dossier::name());
     $pdf->setTitle("Balance analytique", true);
     $pdf->SetAuthor('NOALYSS');
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pa = new Anc_Plan($this->db, $this->pa_id);
     $pa->get();
     $pb = new Anc_Plan($this->db, $this->pa_id2);
     $pb->get();
     $pdf->SetFont('DejaVu', 'B', 9);
     $pdf->Cell(0, 7, sprintf("Balance croise plan %s %s ", $pa->name, $pb->name), 1, 0, 'C');
     $filtre_date = "";
     $filtre_pa = "";
     $filtre_pb = "";
     if ($this->from != "" || $this->to != "") {
         $filtre_date = sprintf("Filtre date  %s %s", $this->from, $this->to);
     }
     if ($this->from_poste != "" || $this->to_poste != "") {
         $filtre_pa = sprintf("Filtre poste plan1  %s %s", $this->from_poste != "" ? "de " . $this->from_poste : " ", $this->to_poste != "" ? "jusque " . $this->to_poste : "");
     }
     if ($this->from_poste2 != "" || $this->to_poste2 != "") {
         $filtre_pb = sprintf("Filtre poste plan2   %s  %s", $this->from_poste2 != "" ? "de " . $this->from_poste2 : " ", $this->to_poste2 != "" ? "jusque " . $this->to_poste2 : "");
     }
     $pdf->SetFont('DejaVu', '', 8);
     $pdf->Cell(50, 7, $filtre_date);
     $pdf->Cell(50, 7, $filtre_pa);
     $pdf->Cell(50, 7, $filtre_pb);
     $pdf->Ln();
     $pdf->SetFont('DejaVu', '', 6);
     $pdf->Cell(20, 7, 'id', 'B');
     $pdf->Cell(100, 7, 'Poste Comptable', 'B');
     $pdf->Cell(20, 7, 'Débit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Crédit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Solde', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'D/C', 'B', 0, 'L');
     $pdf->Ln();
     for ($i = 0; $i < count($array); $i++) {
         $row = $array[$i];
         $pdf->Cell(20, 6, $row['a_po_name'], 0, 0, 'L');
         $pdf->Cell(40, 6, mb_substr($row['a_po_description'], 0, 31), 0, 0, 'L');
         $pdf->Cell(20, 6, $row['b_po_name'], 0, 0, 'L');
         $pdf->Cell(40, 6, mb_substr($row['b_po_description'], 0, 31), 0, 0, 'L');
         $pdf->Cell(20, 6, $row['a_d'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_c'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_solde'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_debit'], 0, 0, 'C');
         $pdf->Ln();
     }
     $sum = $this->show_sum($array);
     $pdf->SetFont('DejaVu', 'B', 8);
     $pdf->Cell(70, 6, 'Somme', 1, 0, 'C');
     $pdf->Ln(5);
     $pdf->SetFont('DejaVu', '', 6);
     $pdf->Cell(20, 7, 'Poste');
     $pdf->Cell(60, 7, 'Description', 'B');
     $pdf->Cell(20, 7, 'Débit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Crédit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Solde', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'D/C', 'B', 0, 'L');
     $pdf->Ln();
     for ($i = 0; $i < count($sum); $i++) {
         $row = $sum[$i];
         $pdf->Cell(20, 6, $row['poste'], 0, 0, 'L');
         $pdf->Cell(60, 6, $row['desc'], 0, 0, 'L');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['debit']), 0, 0, 'R');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['credit']), 0, 0, 'R');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['solde']), 0, 0, 'R');
         $pdf->Cell(20, 6, $row['dc'], 0, 0, 'R');
         $pdf->Ln();
     }
     $fDate = date('dmy-Hi');
     $pdf->output('crossbalance-' . $fDate . '.pdf', 'D');
 }
Пример #18
0
 function automaticSummaryInPDF($submission)
 {
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $articleDrugInfoDao =& DAORegistry::getDAO('ArticleDrugInfoDAO');
     $extraFieldDAO =& DAORegistry::getDAO('ExtraFieldDAO');
     $journal =& Request::getJournal();
     $submitter =& $submission->getUser();
     $title = $journal->getJournalTitle();
     $articleTexts = $submission->getArticleTexts();
     $articleTextLocales = $journal->getSupportedLocaleNames();
     $secIds = $submission->getArticleSecIds();
     $details = $submission->getArticleDetails();
     $purposes = $submission->getArticlePurposes();
     $articlePrimaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_PRIMARY);
     $articleSecondaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_SECONDARY);
     $coutryList = $countryDao->getCountries();
     $articleDrugs = $submission->getArticleDrugs();
     $pharmaClasses = $articleDrugInfoDao->getPharmaClasses();
     $drugStudyClasses = $articleDrugInfoDao->getClassKeysMap();
     $articleSites = $submission->getArticleSites();
     $expertisesList = $extraFieldDAO->getExtraFieldsList(EXTRA_FIELD_THERAPEUTIC_AREA, EXTRA_FIELD_ACTIVE);
     $fundingSources = $submission->getArticleFundingSources();
     $pSponsor = $submission->getArticlePrimarySponsor();
     $sSponsors = $submission->getArticleSecondarySponsors();
     $CROs = $submission->getArticleCROs();
     $contact = $submission->getArticleContact();
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
     import('classes.lib.tcpdf.pdf');
     import('classes.lib.tcpdf.tcpdf');
     $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor($submitter->getFullName());
     $pdf->SetTitle($title);
     $subject = $submission->getProposalId() . ' - ' . Locale::translate('submission.summary');
     $pdf->SetSubject($subject);
     $cell_width = 45;
     $cell_height = 6;
     // set default header data
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', PDF_HEADER_STRING);
     // set header and footer fonts
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     // set default monospaced font
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, 58, 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);
     $pdf->AddPage();
     // Title
     $pdf->SetFont('Times', 'B', 15);
     $w = $pdf->GetStringWidth($title) + 6;
     $pdf->SetX((210 - $w) / 2);
     $pdf->Cell($w, 9, $title, 0, 1, 'C');
     // sub-title
     $pdf->SetFont('Times', 'BI', 14);
     $w2 = $pdf->GetStringWidth($subject) + 6;
     $pdf->SetX((210 - $w2) / 2);
     $pdf->Cell($w2, 9, $subject, 0, 1, 'C');
     // Line break
     $pdf->Ln(10);
     // Main Info
     $pdf->SetFont('Times', '', 12);
     $pdf->MultiRow(50, Locale::translate("common.proposalId"), $submission->getProposalId(), 'L');
     $pdf->MultiRow(50, Locale::translate("article.title"), $submission->getScientificTitle(), 'L');
     $pdf->MultiRow(50, Locale::translate("submission.submitter"), $submitter->getFullName(), 'L');
     $pdf->MultiRow(50, Locale::translate("common.dateSubmitted"), $submission->getDateSubmitted(), 'L');
     // Line break
     $pdf->Ln(10);
     //CT Information
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'I' . Locale::translate('common.queue.long.articleDetails', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     $pdf->SetFont('Times', '', 12);
     $scientificTitle = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$scientificTitle) {
             $pdf->MultiRow(50, Locale::translate("proposal.scientificTitle"), $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $scientificTitle = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $publicTitle = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$publicTitle) {
             $pdf->MultiRow(50, Locale::translate("proposal.publicTitle"), $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $publicTitle = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $firstSecId = null;
     foreach ($secIds as $secId) {
         if (!$firstSecId) {
             $pdf->MultiRow(50, Locale::translate("proposal.articleSecId"), $secId->getSecId() . ' (' . Locale::translate($secId->getTypeKey()) . ')', 'L');
             $firstSecId = true;
         } else {
             $pdf->MultiRow(50, '', $secId->getSecId() . ' (' . Locale::translate($secId->getTypeKey()) . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.protocolVersion"), $details->getProtocolVersion(), 'L');
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.therapeuticArea"), $details->getRightTherapeuticAreaDisplay(), 'L');
     $pdf->Ln(3);
     $firstICD10 = null;
     foreach ($details->getHealthCondDiseaseArrayToDisplay() as $healthCond) {
         $code = $healthCond['code'];
         $exactCode = $healthCond['exactCode'];
         if ($exactCode != '') {
             $code = $code . ' (' . $exactCode . ')';
         }
         if (!$firstICD10) {
             $pdf->MultiRow(50, Locale::translate("proposal.icd10s"), $code, 'L');
             $firstICD10 = true;
         } else {
             $pdf->MultiRow(50, '', $code, 'L');
         }
     }
     $pdf->Ln(3);
     $firstPurpose = null;
     foreach ($purposes as $purpose) {
         if (!$firstPurpose) {
             $purposeTitle = Locale::translate("proposal.purposes");
             $firstPurpose = true;
         } else {
             $purposeTitle = '';
         }
         if ($purpose->getType() == ARTICLE_PURPOSE_TYPE_OBS) {
             $pdf->MultiRow(50, $purposeTitle, Locale::translate($purpose->getTypeKey()), 'L');
         } else {
             $pdf->MultiRow(50, $purposeTitle, Locale::translate('proposal.purpose.type.int'), 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.purposes.type') . ':    ' . Locale::translate($purpose->getTypeKey()), 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.purposes.ctPhase') . ':    ' . Locale::translate($purpose->getCTPhaseKey()), 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.purposes.studyDesign') . ', ' . Locale::translate('proposal.purposes.allocation') . ':    ' . Locale::translate($purpose->getAllocationKey()), 'L');
             $pdf->MultiRow(50, '', '                        ' . Locale::translate('proposal.purposes.masking') . ':    ' . Locale::translate($purpose->getMaskingKey()), 'L');
             $pdf->MultiRow(50, '', '                        ' . Locale::translate('proposal.purposes.control') . ':    ' . Locale::translate($purpose->getControlKey()), 'L');
             $pdf->MultiRow(50, '', '                        ' . Locale::translate('proposal.purposes.assignment') . ':    ' . Locale::translate($purpose->getAssignmentKey()), 'L');
             $pdf->MultiRow(50, '', '                        ' . Locale::translate('proposal.purposes.endpoint') . ':    ' . Locale::translate($purpose->getEndpointKey()), 'L');
         }
     }
     $pdf->Ln(3);
     $description = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$description) {
             $pdf->MultiRow(50, Locale::translate("proposal.description"), $articleText->getDescription() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $description = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getDescription() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $kic = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$kic) {
             $pdf->MultiRow(50, Locale::translate("proposal.keyInclusionCriteria"), $articleText->getKeyInclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $kic = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getKeyInclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $kec = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$kec) {
             $pdf->MultiRow(50, Locale::translate("proposal.keyExclusionCriteria"), $articleText->getKeyExclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $kec = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getKeyExclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $firstPOutcome = null;
     foreach ($articlePrimaryOutcomes as $articleOutcomeLocales) {
         foreach ($articleOutcomeLocales as $key => $articleOutcome) {
             if (!$firstPOutcome) {
                 $outcomeTitle = Locale::translate("proposal.primaryOutcomes");
                 $firstPOutcome = true;
             } else {
                 $outcomeTitle = '';
             }
             $pdf->MultiRow(50, $outcomeTitle, $articleOutcome->getName() . ' (' . $articleTextLocales[$key] . ')', 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.primaryOutcome.measurement') . ':        ' . $articleOutcome->getMeasurement(), 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.primaryOutcome.timepoint') . ':        ' . $articleOutcome->getTimepoint(), 'L');
             $pdf->Ln(3);
         }
     }
     $firstSOutcome = null;
     foreach ($articleSecondaryOutcomes as $articleOutcomeLocales) {
         foreach ($articleOutcomeLocales as $key => $articleOutcome) {
             if (!$firstSOutcome) {
                 $sOutcomeTitle = Locale::translate("proposal.secondaryOutcomes");
                 $firstSOutcome = true;
             } else {
                 $sOutcomeTitle = '';
             }
             $pdf->MultiRow(50, $sOutcomeTitle, $articleOutcome->getName() . ' (' . $articleTextLocales[$key] . ')', 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.primaryOutcome.measurement') . ':        ' . $articleOutcome->getMeasurement(), 'L');
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.primaryOutcome.timepoint') . ':        ' . $articleOutcome->getTimepoint(), 'L');
             $pdf->Ln(3);
         }
     }
     $pdf->MultiRow(50, Locale::translate("proposal.age.minimum"), $details->getMinAgeNum() . ' ' . Locale::translate($details->getMinAgeUnitKey()), 'L');
     $pdf->MultiRow(50, Locale::translate("proposal.age.maximum"), $details->getMaxAgeNum() . ' ' . Locale::translate($details->getMaxAgeUnitKey()), 'L');
     $pdf->MultiRow(50, Locale::translate("proposal.sex"), Locale::translate($details->getSexKey()), 'L');
     $pdf->MultiRow(50, Locale::translate("proposal.healthy"), Locale::translate($details->getYesNoKey($details->getHealthy())), 'L');
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.localeSampleSize"), $details->getLocaleSampleSize(), 'L');
     $pdf->MultiRow(50, Locale::translate("proposal.multinational") . ' ' . $journal->getLocalizedSetting('location'), Locale::translate($details->getYesNoKey($details->getMultinational())), 'L');
     if ($details->getMultinational() == ARTICLE_DETAIL_YES) {
         foreach ($details->getIntSampleSizeArray() as $countryAndNumberArray) {
             $country = $countryAndNumberArray['country'];
             $pdf->MultiRow(50, '', '        ' . $coutryList[$country] . ': ' . $countryAndNumberArray['number'], 'L');
         }
     }
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.expectedDate"), Locale::translate('proposal.startDate') . ': ' . $details->getStartDate() . ', ' . Locale::translate('proposal.endDate') . ': ' . $details->getEndDate(), 'L');
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.recruitment"), Locale::translate("proposal.recruitment.status") . ': ' . Locale::translate($details->getRecruitmentStatusKey()), 'L');
     $rssi = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if ($articleText->getRecruitmentInfo() != '') {
             if (!$rssi) {
                 $pdf->MultiRow(50, '', Locale::translate("proposal.recruitment.info") . ': ' . $articleText->getRecruitmentInfo() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
                 $rssi = true;
             } else {
                 $pdf->MultiRow(50, '', $articleText->getRecruitmentInfo() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             }
         }
     }
     $pdf->MultiRow(50, '', Locale::translate("proposal.recruitment.adScheme") . ': ' . Locale::translate($details->getYesNoKey($details->getAdvertisingScheme())), 'L');
     // Line break
     $pdf->Ln(10);
     //Drug products
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'II' . Locale::translate('common.queue.long.articleDrugs', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     foreach ($articleDrugs as $articleDrug) {
         $pdf->SetFont('Times', 'BU', 12);
         $pdf->Cell(190, 9, $articleDrug->getName(), 0, 1, 'L');
         $pdf->SetFont('Times', '', 12);
         $pdf->Ln(3);
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.type"), Locale::translate($articleDrug->getTypeKey()), 'L');
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.name"), $articleDrug->getName(), 'L');
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.brandName"), $articleDrug->getBrandName(), 'L');
         if ($articleDrug->getOtherAdministration() == 'NA') {
             $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.administration"), Locale::translate($articleDrug->getAdministrationKey()), 'L');
         } else {
             $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.administration"), $articleDrug->getOtherAdministration(), 'L');
         }
         if ($articleDrug->getOtherForm() == 'NA') {
             $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.form"), Locale::translate($articleDrug->getFormKey()), 'L');
         } else {
             $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.form"), $articleDrug->getOtherForm(), 'L');
         }
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.strength"), $articleDrug->getStrength(), 'L');
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.storage"), Locale::translate($articleDrug->getStorageKey()), 'L');
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.pharmaClass"), $pharmaClasses[$articleDrug->getPharmaClass()], 'L');
         $firstClass = false;
         $classIIIOrIV = false;
         $classesToDisplay = '';
         foreach ($articleDrug->getClassesArray() as $class) {
             if ($class == ARTICLE_DRUG_INFO_CLASS_III || $class == ARTICLE_DRUG_INFO_CLASS_IV) {
                 $classIIIOrIV = true;
             }
             if (!$firstClass) {
                 $classesToDisplay = Locale::translate($drugStudyClasses[$class]);
             } else {
                 $classesToDisplay = $classesToDisplay . ', ' . Locale::translate($drugStudyClasses[$class]);
             }
             $firstClass = true;
         }
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.studyClasses"), $classesToDisplay, 'L');
         if ($classIIIOrIV) {
             $countriesToDisplay = '';
             $firstCountry = false;
             foreach ($articleDrug->getCountriesArray() as $country) {
                 if (!$firstCountry) {
                     $countriesToDisplay = $coutryList[$country];
                 } else {
                     $countriesToDisplay = $countriesToDisplay . ', ' . $coutryList[$country];
                 }
                 $firstCountry = true;
             }
             $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.countries") . ': ' . $countriesToDisplay, 'L');
             $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.conditionsOfUse") . ': ' . Locale::translate($articleDrug->getDifferentConditionsOfUseKey()), 'L');
         }
         $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.cpr"), Locale::translate($articleDrug->getCPRKey()), 'L');
         if ($articleDrug->getCPR() == ARTICLE_DRUG_INFO_YES) {
             $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.drugRegistrationNumber") . ': ' . $articleDrug->getDrugRegistrationNumber(), 'L');
         }
         if ($articleDrug->getImportedQuantity() != '') {
             $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.importedQuantity"), $articleDrug->getImportedQuantity(), 'L');
         }
         $firstManufacturer = false;
         foreach ($articleDrug->getManufacturers() as $manufacturer) {
             $manufacturerTitle = '';
             if (!$firstManufacturer) {
                 $manufacturerTitle = Locale::translate('proposal.drugInfo.manufacturers');
             }
             $pdf->MultiRow(50, $manufacturerTitle, $manufacturer->getName(), 'L');
             $pdf->MultiRow(50, '', Locale::translate('proposal.drugInfo.manufacturer.address') . ': ' . $manufacturer->getAddress(), 'L');
             $firstManufacturer = true;
             $pdf->Ln(2);
         }
         $pdf->Ln(3);
     }
     // Line break
     $pdf->Ln(10);
     // Trial Site(s)
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'III' . Locale::translate('common.queue.long.articleSites', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     foreach ($articleSites as $articleSite) {
         $trialSiteObject = $articleSite->getTrialSiteObject();
         $pdf->SetFont('Times', 'BU', 12);
         $pdf->Cell(190, 9, $trialSiteObject->getName(), 0, 1, 'L');
         $pdf->SetFont('Times', '', 12);
         $pdf->Ln(3);
         $pdf->MultiRow(50, Locale::translate("proposal.articleSite.site"), $trialSiteObject->getName(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteAddress') . ': ' . $trialSiteObject->getAddress(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteCity') . ': ' . $trialSiteObject->getCity(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteRegion') . ': ' . $trialSiteObject->getRegionText(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteLicensure') . ': ' . $trialSiteObject->getLicensure(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteAccreditation') . ': ' . $trialSiteObject->getAccreditation(), 'L');
         $pdf->Ln(2);
         $pdf->MultiRow(50, Locale::translate("proposal.articleSite.erc"), $articleSite->getERCName(), 'L');
         $pdf->Ln(2);
         $pdf->MultiRow(50, Locale::translate("proposal.articleSite.authority"), $articleSite->getAuthority(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.primaryPhone') . ': ' . $articleSite->getPrimaryPhone(), 'L');
         if ($articleSite->getSecondaryPhone()) {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.secondaryPhone') . ': ' . $articleSite->getSecondaryPhone(), 'L');
         }
         if ($articleSite->getFax()) {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.fax') . ': ' . $articleSite->getFax(), 'L');
         }
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.email') . ': ' . $articleSite->getEmail(), 'L');
         $pdf->Ln(2);
         $pdf->MultiRow(50, Locale::translate("proposal.articleSite.subjectsNumber"), $articleSite->getSubjectsNumber(), 'L');
         $pdf->Ln(2);
         $countInvestigators = 1;
         foreach ($articleSite->getInvestigators() as $investigator) {
             $investigatorTitle = "";
             if ($countInvestigators == 1) {
                 $investigatorTitle = Locale::translate('user.role.primaryInvestigator');
             } elseif ($countInvestigators == 2) {
                 $investigatorTitle = Locale::translate('user.role.coinvestigator');
             }
             $pdf->MultiRow(50, $investigatorTitle, $investigator->getFullName(), 'L');
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.expertise') . ': ' . $expertisesList[$investigator->getExpertise()], 'L');
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iPrimaryPhone') . ': ' . $investigator->getPrimaryPhoneNumber(), 'L');
             if ($investigator->getSecondaryPhoneNumber()) {
                 $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iSecondaryPhone') . ': ' . $investigator->getSecondaryPhoneNumber(), 'L');
             }
             if ($investigator->getFaxNumber()) {
                 $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iFax') . ': ' . $investigator->getFaxNumber(), 'L');
             }
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iEmail') . ': ' . $investigator->getEmail(), 'L');
             $countInvestigators++;
         }
         $pdf->Ln(3);
     }
     // Line break
     $pdf->Ln(10);
     // Sponsors
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'IV' . Locale::translate('common.queue.long.articleSponsors', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     $pdf->SetFont('Times', '', 12);
     $firstFSource = false;
     foreach ($fundingSources as $fundingSource) {
         $fSourceTitle = '';
         if (!$firstFSource) {
             $fSourceTitle = Locale::translate('proposal.articleSponsor.fundingSources');
         }
         $institution = $fundingSource->getInstitutionObject();
         $pdf->MultiRow(50, $fSourceTitle, $institution->getInstitutionName(), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L');
         if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) {
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L');
         } else {
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L');
         }
         $pdf->Ln(2);
         $firstFSource = true;
     }
     $pdf->Ln(1);
     $institution = $pSponsor->getInstitutionObject();
     $pdf->MultiRow(50, Locale::translate("proposal.articleSponsor.primarySponsor"), $institution->getInstitutionName(), 'L');
     $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L');
     $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L');
     $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L');
     if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) {
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L');
     } else {
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L');
     }
     $pdf->Ln(3);
     $firstSSponsor = false;
     foreach ($sSponsors as $sSponsor) {
         $SSponsorTitle = '';
         if (!$firstSSponsor) {
             $SSponsorTitle = Locale::translate('proposal.articleSponsor.secondarySponsors');
         }
         $institution = $sSponsor->getInstitutionObject();
         $pdf->MultiRow(50, $SSponsorTitle, $institution->getInstitutionName(), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L');
         $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L');
         if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) {
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L');
         } else {
             $pdf->MultiRow(50, '', '        ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L');
         }
         $pdf->Ln(2);
         $firstSSponsor = true;
     }
     $pdf->Ln(1);
     $pdf->MultiRow(50, Locale::translate("proposal.articleSponsor.croInvolved"), Locale::translate($details->getYesNoKey($details->getCROInvolved())), 'L');
     foreach ($CROs as $CRO) {
         $pdf->MultiRow(50, '', $CRO->getName(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.location') . ': ' . $CRO->getInternationalText(), 'L');
         if ($CRO->getInternational() == CRO_INTERNATIONAL) {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $CRO->getLocationText(), 'L');
         } else {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $CRO->getLocationText(), 'L');
         }
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.city') . ': ' . $CRO->getCity(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.address') . ': ' . $CRO->getAddress(), 'L');
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.primaryPhone') . ': ' . $CRO->getPrimaryPhone(), 'L');
         if ($CRO->getSecondaryPhone()) {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.secondaryPhone') . ': ' . $CRO->getSecondaryPhone(), 'L');
         }
         if ($CRO->getFax()) {
             $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.fax') . ': ' . $CRO->getFax(), 'L');
         }
         $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.email') . ': ' . $CRO->getEmail(), 'L');
         $pdf->Ln(2);
     }
     $pdf->Ln(1);
     // Line break
     $pdf->Ln(10);
     // Contact Information
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'V' . Locale::translate('common.queue.long.articleContact', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     $pdf->SetFont('Times', '', 12);
     $pdf->MultiRow(50, Locale::translate("proposal.articleContact.pq"), $contact->getPQName(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.affiliation") . ': ' . $contact->getPQAffiliation(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.address") . ': ' . $contact->getPQAddress(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.country") . ': ' . $coutryList[$contact->getPQCountry()], 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.phone") . ': ' . $contact->getPQPhone(), 'L');
     if ($contact->getPQFax() != '') {
         $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.fax") . ': ' . $contact->getPQFax(), 'L');
     }
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.email") . ': ' . $contact->getPQEmail(), 'L');
     $pdf->Ln(3);
     $pdf->MultiRow(50, Locale::translate("proposal.articleContact.sq"), $contact->getSQName(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.affiliation") . ': ' . $contact->getSQAffiliation(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.address") . ': ' . $contact->getSQAddress(), 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.country") . ': ' . $coutryList[$contact->getSQCountry()], 'L');
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.phone") . ': ' . $contact->getSQPhone(), 'L');
     if ($contact->getPQFax() != '') {
         $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.fax") . ': ' . $contact->getSQFax(), 'L');
     }
     $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.email") . ': ' . $contact->getSQEmail(), 'L');
     $pdf->Output($submission->getProposalId() . '-' . Locale::translate('submission.summary') . '.pdf', "D");
 }
Пример #19
0
$c3x = $c2x + $w;
$c4x = $c3x + $w;
$c1h = 170;
$c2h = $c1h / 2;
$c3h = $c2h / 2;
$c4h = $c3h / 2;
$bottom = $top + $c1h;
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER["PHP_SELF"]);
$pdf->SetAuthor("Keith Morrison, keithm@infused.org");
$pdf->SetTitle(sprintf(gtc("Pedigree for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
# Person 1
$pdf->SetY($top);
$pdf->SetX($c1x);
$pdf->Cell($w, $c1h, '', 1, 0, 'L');
$pdf->SetY($top + $c1h / 2 - 6);
$pdf->SetX($c1x);
$pdf->SetFont($font, 'B', 10);
$pdf->MultiCell($w, 4, isset($g_node_strings[1][0]) ? $g_node_strings[1][0] : '', 0, 'L');
$pdf->SetFont($font, '', 10);
$pdf->Cell($w, 4, isset($g_node_strings[1][1]) ? $g_node_strings[1][1] : '', 0, 2, 'L');
$pdf->Cell($w, 4, isset($g_node_strings[1][2]) ? $g_node_strings[1][2] : '', 0, 0, 'L');
# Person 2
$pdf->SetY($top);
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
/**
 * letter_non_embedded certificate type
 *
 * @package    mod_certificate
 * @copyright  Mark Nelson <*****@*****.**>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
defined('MOODLE_INTERNAL') || die;
$pdf = new PDF($certificate->orientation, 'pt', 'A4', true, 'UTF-8', false);
$pdf->SetAuthor('Ananda Gestión, S.L.');
$pdf->SetTitle('Certificado de Acreditación');
$pdf->SetSubject('Curso Prevención de Riesgos Laborales');
$pdf->SetMargins(75, 20, 75, true);
$pdf->SetProtection(array('modify'));
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetAutoPageBreak(false, 0);
$pdf->AddPage();
//página 1
// Define variables
// Landscape
if ($certificate->orientation == 'L') {
    $x = 28;
    $y = 125;
    $sealx = 590;
Пример #21
0
 function format($text)
 {
     include_once 'lib/Template.php';
     global $request;
     $tokens['page'] = $this->_page;
     $tokens['CONTENT'] = $this->_transform($text);
     $pagename = $this->_page->getName();
     // This is a XmlElement tree, which must be converted to PDF
     // We can make use of several pdf extensions. This one - fpdf
     // - is pure php and very easy, but looks quite ugly and has a
     // terrible interface, as terrible as most of the othes.
     // The closest to HTML is htmldoc which needs an external cgi
     // binary.
     // We use a custom HTML->PDF class converter from PHPWebthings
     // to be able to use templates for PDF.
     require_once 'lib/fpdf.php';
     require_once 'lib/pdf.php';
     $pdf = new PDF();
     $pdf->SetTitle($pagename);
     $pdf->SetAuthor($this->_page->get('author'));
     $pdf->SetCreator(WikiURL($pagename, false, 1));
     $pdf->AliasNbPages();
     $pdf->AddPage();
     //TODO: define fonts
     $pdf->SetFont('Times', '', 12);
     //$pdf->SetFont('Arial','B',16);
     // PDF pagelayout from a special template
     $template = new Template('pdf', $request, $tokens);
     $pdf->ConvertFromHTML($template);
     // specify filename, destination
     $pdf->Output($pagename . ".pdf", 'I');
     // I for stdin or D for download
     // Output([string name [, string dest]])
     return $pdf;
 }
Пример #22
0
                        $pdf->Cell(20, $height, $keynum, 1, 0, 'C', false);
                        $pdf->Cell($width, $height, _get_key_label($knump), $border, 0, 'C', $fill);
                        # Spalte 2
                        $knump = str_pad($knum + 14, 4, '0', STR_PAD_LEFT);
                        $pdf->Cell($width, $height, _get_key_label($knump), $border, 0, 'C', !$fill);
                        $pdf->Cell(20, $height, $keynum + 14, 1, 0, 'C', false);
                        # Spalte 3
                        $knump = str_pad($knum + 28, 4, '0', STR_PAD_LEFT);
                        $pdf->Cell(20, $height, $keynum + 28, 1, 0, 'C', false);
                        $pdf->Cell($width, $height, _get_key_label($knump), $border, 0, 'C', $fill);
                        # Spalte 4
                        $knump = str_pad($knum + 42, 4, '0', STR_PAD_LEFT);
                        $pdf->Cell($width, $height, _get_key_label($knump), $border, 0, 'C', !$fill);
                        $pdf->Cell(20, $height, $keynum + 42, 1, 0, 'C', false);
                    }
                    $pdf->Ln();
                }
                $fill = !$fill;
            }
            if ($phone_layout === 'snom' && $key_level_idx == 2) {
                $pdf->AddPage();
            }
            if ($phone_layout === 'grandstream' && $key_level_idx < 2) {
                $pdf->AddPage();
            }
        }
    }
}
$pdf->SetCreator('Gemeinschaft');
$pdf->SetAuthor('Gemeinschaft');
$pdf->Output(__('Tastenbeschriftung') . '_' . $phone_type . '_' . $user_name . '.pdf', 'D');
Пример #23
0
    {
        $usuarioNome = $_GET['UsuarioNome'];
        //Position at 1.5 cm from bottom
        $this->SetY(-15);
        //Arial italic 8
        $this->SetFont('Arial', 'I', 7);
        //Page number
        $this->Line(10, 281, 200, 281);
        $this->Cell(0, 3, 'Emitido por: ' . $usuarioNome);
    }
}
//Instancia a classe gerador de pdf
$pdf = new PDF();
//Define os atributos de propriedade do arquivo PDF
$pdf->SetCreator('work | eventos');
$pdf->SetAuthor($usuarioNome . ' - ' . $empresaNome);
$pdf->SetTitle('Relação de Retornos por Data');
$pdf->SetSubject('Relatório gerado automaticamente pelo sistema');
$pdf->AliasNbPages();
$pdf->AddPage('L');
//Verifica se existem registros
if ($registros > 0) {
    //Define o status zero para fazer a quebra
    if ($edtTipoConsulta == "0") {
        $status_atual = 1;
        $pdf->SetFont('Arial', 'B', 14);
        $pdf->Cell(0, 5, "Títulos Processados");
        $pdf->ln();
    } else {
        $status_atual = $edtTipoConsulta;
        switch ($status_atual) {
Пример #24
0
 function run()
 {
     // change some win codes, and xhtml into html
     $str = array('<br />' => '<br>', '<hr />' => '<hr>', '[r]' => '<red>', '[/r]' => '</red>', '[l]' => '<blue>', '[/l]' => '</blue>', '&#8220;' => '"', '&#8221;' => '"', '&#8222;' => '"', '&#8230;' => '...', '&#8217;' => '\'');
     foreach ($str as $_from => $_to) {
         $this->html = str_replace($_from, $_to, $this->html);
     }
     $pdf = new PDF('P', 'mm', 'A4', $this->title, $this->articleurl, false);
     $pdf->Open();
     $pdf->SetCompression(true);
     $pdf->SetCreator("Script by Radek HULAN, http://hulan.info/blog/");
     $pdf->SetDisplayMode('real');
     $pdf->SetTitle($this->_convert($this->title));
     $pdf->SetAuthor($this->articleurl);
     $pdf->AddPage();
     // face
     $pdf->PutMainTitle($this->_convert($this->title));
     $pdf->PutMinorHeading('Article URI');
     $pdf->PutMinorTitle($this->articleurl, $this->articleurl);
     $pdf->PutMinorHeading('Author');
     $pdf->PutMinorTitle($this->_convert($this->author));
     $pdf->PutMinorHeading("Published: " . date("F j, Y, g:i a", $this->date));
     $pdf->PutLine();
     $pdf->Ln(10);
     // html
     $pdf->WriteHTML($this->_convert(stripslashes($this->html)), $this->bi);
     //save and redirect
     $filename = $this->directory . $this->_makeFileName($this->title) . '.pdf';
     $http = $this->http . $this->_makeFileName($this->title) . '.pdf';
     $pdf->Output($filename);
     header("Location: {$http}");
     // cleanup
     $files = opendir($this->directory);
     while (false !== ($filename = readdir($files))) {
         if (!(strpos($filename, '.pdf') === false)) {
             // delete old temp files
             $time = filectime($this->directory . $filename);
             if (!($time === false) && $time > 0) {
                 if ($time + $this->delete * 60 < time()) {
                     unlink($this->directory . $filename);
                 }
             }
         }
     }
     // stop processing
     exit;
 }
$products_total = tep_db_num_rows($result);
$logger->write('Found ' . $products_total . ' products >1 star');
while ($row = tep_db_fetch_array($result)) {
    $row['fmargin'] = number_format($row['margin'], 1) . '%';
    $row['weekly'] = array();
    $row['total_sold_L4W'] = 0;
    foreach ($weekly_name as $wkey => $wn) {
        $row['weekly'][$wkey] = getOrderWeekly($row['products_id'], $wkey, $filter_date, $sp_list);
        $row['total_sold_L4W'] += $row['weekly'][$wkey]['total_sold'];
    }
    $products[$row['catid']][$row['products_id']] = $row;
}
$logger->write('Creating PDF File');
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Sales Report Weekly Products');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('Manobo PDF Generator');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(true, 25);
$pdf->AliasNbPages();
$pdf->AddPage('L');
$margin = 30;
$ypos = 10;
$cellstart = $margin;
$cellsize = 48;
$cellsize_half = $cellsize / 2;
$cellsizecollweek = $cellsize + $margin;
$cell_height_col = 55;
$cell_height = 5;
$pdf->setXY($margin, $ypos);
$pdf->setFont('Arial', 'B', '14');
Пример #26
0
        // Title
        $this->Cell(0, 6, "Chapter {$num} : {$label}", 0, 1, 'L', true);
        // Line break
        $this->Ln(4);
    }
    function ChapterBody($file)
    {
        // Read text file
        $txt = file_get_contents($file);
        // Times 12
        $this->SetFont('Times', '', 12);
        // Output justified text
        $this->MultiCell(0, 5, $txt);
        // Line break
        $this->Ln();
        // Mention in italics
        $this->SetFont('', 'I');
        //$this->Cell(0,5,'(end of excerpt)');
    }
    function PrintChapter($num, $title, $file)
    {
        $this->AddPage();
        //$this->ChapterTitle($num,$title);
        $this->ChapterBody($file);
    }
}
$pdf = new PDF();
$pdf->SetAuthor('CViA');
$pdf->PrintChapter(1, 'A PDF TEST', $text_file);
$pdf->Output();
unlink($text_file);
Пример #27
0
         //Ensure table header is output
         parent::Header();
     }
     function Footer()
     {
         //Position at 1.5 cm from bottom
         $this->SetY(-15);
         //Arial italic 8
         $this->SetFont('Arial', 'I', 8);
         //Page number
         $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
     }
 }
 $pdf = new PDF('L', $unit = 'mm', $format = 'A4');
 $pdf->AliasNbPages();
 $pdf->SetAuthor("*****@*****.**");
 $pdf->SetSubject("Daily Sales");
 $pdf->SetTitle("Daily Sales");
 $pdf->SetCreator("Imran Zahid");
 $prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'color3' => array(128, 128, 128), 'padding' => 2, 'font' => array('Arial', '', 10), 'thfont' => array('Arial', 'B', 10));
 $pdf->AddPage();
 $pdf->AddCol('party_name', "20%", 'Party', 'L');
 $pdf->AddCol('vendor', "20%", 'Vendor', 'L');
 $pdf->AddCol('cat_name', "20%", 'Category', 'L');
 $pdf->AddCol('description', "20%", 'Item', 'L');
 $pdf->AddCol("cs", "10%", 'CS', 'R');
 $pdf->AddCol("pc", "10%", 'PC', 'R');
 $pdf->Table($data, $prop);
 $_cMargin = $pdf->cMargin;
 $pdf->cMargin = $prop['padding'];
 $pdf->SetFont('Arial', 'B', 10);
Пример #28
0
         $pdf->TravelDistancesAndExpensesTableFooter($total_travel_distance, $total_expenses);
         // Finally the document needs one last signature
         if ($_POST['show_signature']) {
             $pdf->InvoiceSignature();
         }
         // if ($_POST['show_signature'])
     }
     // if ($table_header_set)
     break;
 case 'report_consolidated_projects_per_employee':
     $database = $_SESSION['database'];
     // *** Create pdf object ***
     $pdf = new PDF('L');
     // The report should be landscape
     $pdf->SetTitle(REPORT_NAME_CONSOLIDATED_PROJECTS_PER_EMPLOYEE);
     $pdf->SetAuthor(TITLE);
     $pdf->AddPage();
     $periodstartdate = $database->prepare_input(tep_periodstartdate($_POST['period']));
     $employees_query_string = 'SELECT ts.timesheets_start_date, ts.timesheets_end_date, cus.customers_id, cus.customers_name, cus.customers_billing_show_logo, bu.business_units_image, bu.business_units_image_position, pr.projects_id, pr.projects_name, rl.roles_id, rl.roles_name, rl.roles_mandatory_ticket_entry, act.activities_date, emp.employees_id, emp.employees_fullname, act.activities_amount, units.units_id, units.units_name, tar.tariffs_amount, act.activities_travel_distance, act.activities_expenses, act.activities_ticket_number, act.activities_expenses + (act.activities_amount * tar.tariffs_amount) AS total, act.activities_comment ' . 'FROM ' . TABLE_TIMESHEETS . ' AS ts ' . 'INNER JOIN (' . TABLE_EMPLOYEES . ' AS emp, ' . TABLE_ACTIVITIES . ' AS act, ' . TABLE_UNITS . ', ' . TABLE_TARIFFS . ' AS tar, ' . TABLE_EMPLOYEES_ROLES . ' AS er, ' . TABLE_ROLES . ' AS rl, ' . TABLE_PROJECTS . ' AS pr, ' . TABLE_CUSTOMERS . ' AS cus, ' . TABLE_BUSINESS_UNITS . ' AS bu) ' . 'ON (ts.employees_id = emp.employees_id ' . 'AND act.timesheets_id = ts.timesheets_id ' . 'AND act.tariffs_id = tar.tariffs_id ' . 'AND units.units_id = tar.units_id ' . 'AND er.employees_roles_id = tar.employees_roles_id ' . 'AND rl.roles_id = er.roles_id ' . 'AND pr.projects_id = rl.projects_id ' . 'AND cus.customers_id = pr.customers_id ' . 'AND bu.business_units_id = pr.business_units_id) ' . 'WHERE ts.timesheets_start_date = "' . $periodstartdate . '" ' . 'ORDER BY emp.employees_id, act.activities_date, cus.customers_id, pr.projects_id, rl.roles_id, units.units_id';
     $employees_query = $database->query($employees_query_string);
     $employees_array = array();
     $employees_id = '';
     $table_header_set = false;
     while ($employees_result = $database->fetch_array($employees_query)) {
         if ($employees_id != $employees_result['employees_id']) {
             $employees_id = $employees_result['employees_id'];
             if ($table_header_set) {
                 // A previous table exists, create a footer for that one
                 $pdf->ConsolidatedProjectsTableFooter($total_amount, $total_value, $total_travel_distance, $total_expenses);
                 $pdf->AddPage();
             }
    {
        $usuarioNome = $_GET["UsuarioNome"];
        //Position at 1.5 cm from bottom
        $this->SetY(-15);
        //Arial italic 8
        $this->SetFont('Arial', 'I', 7);
        //Page number
        $this->Line(10, 281, 200, 281);
        $this->Cell(0, 3, 'Emitido por: ' . $usuarioNome);
    }
}
//Instancia a classe gerador de pdf
$pdf = new PDF();
//Define os atributos de propriedade do arquivo PDF
$pdf->SetCreator('work | eventos');
$pdf->SetAuthor($usuarioNome . " - " . $empresaNome);
$pdf->SetTitle('Relação de Momentos de Repertório');
$pdf->SetSubject('Relatório gerado automaticamente pelo sistema');
$pdf->AliasNbPages();
$pdf->AddPage();
//Títulos das colunas
$pdf->SetFont('Arial', 'B', 10);
//Define a cor RGB do fundo da celula
$pdf->SetFillColor(178, 178, 178);
//Faz a célula ser preenchida. Isso é feito setando 1 após a expressao de alinhamento
$pdf->Cell(0, 6, 'Descrição do Momento de Repertório', 1, 0, 'L', 1);
$pdf->SetX(170);
$pdf->Cell(0, 6, 'Ativo');
//Monta as linhas com os dados da query
$pdf->SetFont('Arial', '', 10);
while ($dados = mysql_fetch_array($sql)) {
Пример #30
0
* 07/27/2003 by Christian Ehret chris@uffbasse.de
*/
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once 'bookingclass.inc.php';
$booking = new Booking();
$bookid = $request->GetVar('bookid', 'get');
$bookdata = $booking->getMeldedata($bookid);
define('FPDF_FONTPATH', $fontpath);
include_once 'fpdf.php';
include_once 'pdf.php';
$fonttype = 'times';
$pdf = new PDF();
$pdf->Open();
$pdf->SetTitle('ZVS Meldeschein');
$pdf->SetAuthor($request->GetVar('hotel_name', 'session'));
$pdf->SetCreator('ZVS');
$pdf->AliasNbPages();
$pdf->AddPage(P);
$pdf->ln(5);
$y = $pdf->GetY();
// Address
$pdf->SetFont($fonttype, 'B', 10);
$pdf->Write(5, $request->GetVar('hotel_name', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_street', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_zip', 'session') . " " . $request->GetVar('hotel_city', 'session'));
// Headline