当前位置: 首页>>代码示例>>PHP>>正文


PHP FPDF::SetDisplayMode方法代码示例

本文整理汇总了PHP中FPDF::SetDisplayMode方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::SetDisplayMode方法的具体用法?PHP FPDF::SetDisplayMode怎么用?PHP FPDF::SetDisplayMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FPDF的用法示例。


在下文中一共展示了FPDF::SetDisplayMode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pedido

foreach ($p_id_pedido_item as $chave => $id_pedido_item) {
    $valida = valida_numero($id_pedido_item);
    if ($valida != 'TRUE') {
        echo 'Ocorreu um erro ao validar o número dos pedido(s) selecionado(s). O número
de um dos pedidos não é válido';
        exit;
    }
    if ($anexar == 'on') {
        $pdf = new FPDF('P', 'cm', 'A4');
        //papel personalizado
        $pdf->Open();
        $pdf->SetMargins(1, 2);
        //seta as margens do documento
        $pdf->SetAuthor('Vsites 2009');
        $pdf->SetFont('times', '', 7);
        $pdf->SetDisplayMode(100, 'continuous');
        //define o nivel de zoom do documento PDF
        $coluna = 0;
        $linha = 0;
        $posicaoH = 0;
        $posicaoV = 0;
    }
    $bloco = '';
    $ped = $pedidoDAO->selecPedidoPorIdOficio($id_pedido_item, $controle_id_empresa);
    if ($ped->id_pedido != '') {
        $linha_bloco = 1;
        $ordem = $ped->ordem;
        $id_pedido = $ped->id_pedido;
        $id_servico = $ped->id_servico;
        $id_conveniado = $ped->id_conveniado;
        $contato = $ped->contato;
开发者ID:tricardo,项目名称:CartorioPostal_old,代码行数:31,代码来源:gera_imoveis_busca_ultimo_original.php

示例2: exportPdf

 function exportPdf()
 {
     $db = JFactory::getDBO();
     while (ob_get_level()) {
         ob_end_clean();
     }
     header("Content-Encoding: None", true);
     require JPATH_COMPONENT . DS . 'helpers' . DS . 'fpdf.php';
     include_once JPATH_COMPONENT . DS . 'helpers' . DS . 'font' . DS . 'helvetica.php';
     $quiz_id = intval(JRequest::getVar("id", ""));
     //create a FPDF object
     $pdf = new FPDF();
     //set font for the entire document
     $pdf->SetFont('Arial', 'B', 20);
     $pdf->SetTextColor(50, 60, 100);
     //set up a page
     $pdf->AddPage();
     @$pdf->SetDisplayMode(real, 'default');
     $pdf->SetXY(10, 5);
     $pdf->SetFontSize(8);
     $z = 25;
     $t = $z + 10;
     $pdf->SetXY(10, $t);
     $pdf->SetFontSize(7);
     $pdf->Cell(25, 10, JText::_("GURU_NAME"), 'LRTB', '', 'L', 0);
     $pdf->Cell(39, 10, JText::_("GURU_EMAIL"), 'LRTB', '', 'L', 0);
     $pdf->Cell(100, 10, JText::_("GURU_PROGRAM"), 'LRTB', '', 'L', 0);
     $pdf->Ln();
     $pid = JRequest::getVar("course", 0);
     $result = array();
     $user = JFactory::getUser();
     $sql = "select `id` from #__guru_program where `author` like '%|" . intval($user->id) . "|%' OR `author`='" . intval($user->id) . "'";
     $db->setQuery($sql);
     $db->query();
     $courses_ids = $db->loadColumn();
     $sql = "select `id`, `name` from #__guru_program where `author` like '%|" . intval($user->id) . "|%' OR `author`='" . intval($user->id) . "'";
     $db->setQuery($sql);
     $db->query();
     $courses_names = $db->loadAssocList("id");
     if (!isset($courses_ids) || count($courses_ids) <= 0) {
         $courses_ids = array("0" => "0");
     }
     if (intval($pid) != 0) {
         $courses_ids = array(intval($pid));
     }
     $sql = "select distinct(`userid`) from #__guru_buy_courses where `course_id` in (" . implode(",", $courses_ids) . ")";
     $db->setQuery($sql);
     $db->query();
     $students_ids = $db->loadColumn();
     if (isset($students_ids) && count($students_ids) > 0) {
         $sql = "select distinct(c.`userid`), A.`courses`, u.* from #__guru_buy_courses c, (select `userid`, GROUP_CONCAT(`course_id` SEPARATOR '-') as courses from #__guru_buy_courses where `course_id` in (" . implode(",", $courses_ids) . ") group by `userid`) as A, #__users u, #__guru_customer cust where `course_id` in (" . implode(",", $courses_ids) . ") and c.`userid`=A.`userid` and u.`id`=c.`userid` and cust.`id`=u.`id`";
         $db->setQuery($sql);
         $db->query();
         $result = $db->loadAssocList();
     }
     $new_id = 0;
     $nr = 1;
     for ($i = 0; $i < count($result); $i++) {
         $name = $result[$i]["name"];
         $email = $result[$i]["email"];
         $courses = $result[$i]["courses"];
         $student_courses = array();
         $courses = explode("-", $courses);
         if (isset($courses) && count($courses) > 0) {
             foreach ($courses as $key => $value) {
                 $student_courses[] = $courses_names[$value]["name"];
             }
         }
         $pdf->SetFontSize(7);
         $pdf->Cell(25, 10, $name, 'LRTB', '', 'L', 0);
         $pdf->Cell(39, 10, $email, 'LRTB', '', 'L', 0);
         $pdf->Cell(100, 10, implode(", ", $student_courses), 'LRTB', '', 'L', 0);
         $pdf->Ln();
     }
     //Output the document
     $pdf->Output('ExportResult.pdf', 'I');
 }
开发者ID:JozefAB,项目名称:neoacu,代码行数:77,代码来源:guruAuthor.php

示例3: ClearanceStatus

$stud_deptID = $student_model->getStud_DeptID();
$signatorial_model = new SignatorialList_Model();
$signatorial_model->getListofSignatoryByDept($stud_deptID, $stud_status);
$listOfSignatories["name"] = $signatorial_model->getSign_Name();
$listOfSignatories["id"] = $signatorial_model->getSign_ID();
$clearance_model = new ClearanceStatus();
foreach ($listOfSignatories["id"] as $key => $value) {
    $status = $clearance_model->getOverallSignatoryClearanceStatus($stud_id, $value, $current_sysemID);
    if ($status == "No Requirements") {
        $status = "Cleared";
    }
    $listOfSignatories["status"][$key] = $status;
}
//var_dump($listOfSignatories);
$fpdf = new FPDF('P', 'mm', 'Legal');
$fpdf->SetDisplayMode('fullpage', 'continuous');
$fpdf->SetTitle("SOCS Clearance - Export Copy");
$fpdf->SetCreator("USEP SOCS");
$fpdf->SetAuthor("University of Southeastern Philippines");
$fpdf->SetSubject("Electronic Clearance (export copy)");
$fpdf->SetMargins(15, 15, 15);
$fpdf->AddPage();
$fpdf->SetY('15');
$fpdf->Image('logo.jpg', 13, $fpdf->GetY() - 5, 25);
printBody();
$fpdf->Cell(0, 0, "Registrar's Copy", 0, 1, 'R', false);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "", 1, 1, 'L', true);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "Adviser's Copy", 0, 1, 'R', false);
$fpdf->SetY($fpdf->GetY() + 10);
开发者ID:bilfspk,项目名称:student-online-clearance-system,代码行数:31,代码来源:export.php

示例4: FPDF

<?php

require 'fpdf16/fpdf.php';
require 'connection.php';
validate_user();
$pdf = new FPDF();
$pdf->AliasNbPages();
$pdf->SetTopMargin(20);
$pdf->SetLeftMargin(45);
$pdf->SetAutoPageBreak(1, 0.5);
$pdf->SetDisplayMode(100);
$pdf->SetAutoPageBreak(true, 10);
$pdf->AddPage();
//$pdf->AddPage('L');
$pdf->SetDisplayMode(110, "single");
$pdf->SetTitle("Netherhall House");
$border = 0;
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetFillColor(255, 255, 255);
$request = filter_input_array(INPUT_POST);
if ($request[name] != "") {
    $r = mysql_query("SELECT * FROM residents LEFT JOIN countries on residents.country_id = countries.country_id WHERE name LIKE '%{$request[name]}%' OR surname LIKE '%{$request[name]}%'");
} else {
    $today = date("Y", time()) . "-" . date("m", time()) . "-" . date("d", time());
    if (!isset($request[academic_year]) || $request[academic_year] == "current") {
        // >= 28 days = 4 weeks
        //$condition_search=" AND bookings.arrival <= '$today' AND bookings.departure >= '$today' AND DATEDIFF(bookings.departure,bookings.arrival) >= 28  ";
        // 06-Feb-2010 - They want to see all the residents in the current residents list. So I remove the condition about days.
        $condition_search = " AND bookings.arrival <= '{$today}' AND bookings.planned_departure >= '{$today}' ";
    } elseif ($request[academic_year] == "short") {
        // < 28 days = 4 weeks
开发者ID:albertcabre,项目名称:worldresidents,代码行数:31,代码来源:pdf_residents_pictures.php

示例5: FPDF

    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 Webfinance; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
//
// $Id: gen_facture.php 532 2007-06-14 10:39:19Z thierry $
// Génère un PDF pour une facture
require "../inc/main.php";
# If user is not logged, generate a PDF with an explicit error message
if (!isset($_SESSION['id_user']) || $_SESSION['id_user'] < 1) {
    $pdf = new FPDF('P', 'mm', 'A4');
    $pdf->SetMargins(10, 10, 10);
    $pdf->SetDisplayMode('fullwidth');
    $pdf->SetAutoPageBreak(true);
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 12);
    $pdf->Cell(190, 20, _("You are not authenticated"));
    $pdf->SetSubject(_('Error'));
    $pdf->SetTitle(_('Error'));
    $pdf->Output(_("Error") . ".pdf", "I");
    die;
}
# Check if the invoice id is defined
if (!isset($_GET['id']) or !is_numeric($_GET['id'])) {
    die(_("Error: Missing invoice id"));
}
$docs = false;
if ($_GET['docs'] == 1) {
开发者ID:lopacinski,项目名称:WebFinance,代码行数:31,代码来源:gen_facture.php

示例6: FPDF

 /**
  * Download task list as attachment
  *
  * @access public
  * @param void
  * @return null
  */
 function download_list()
 {
     $task_list = ProjectTaskLists::findById(get_id());
     if (!$task_list instanceof ProjectTaskList) {
         flash_error(lang('task list dnx'));
         $this->redirectTo('task');
     }
     // if
     $this->canGoOn();
     if (!$task_list->canView(logged_user())) {
         flash_error(lang('no access permissions'));
         $this->redirectToReferer(get_url('task'));
     }
     // if
     $output = array_var($_GET, 'output', 'csv');
     $project_name = active_project()->getName();
     $task_list_name = $task_list->getName();
     $task_count = 0;
     if ($output == 'pdf') {
         Env::useLibrary('fpdf');
         $download_name = "{$project_name}-{$task_list_name}-tasks.pdf";
         $download_type = 'application/pdf';
         $pdf = new FPDF();
         $pdf->AddPage();
         $pdf->SetTitle($task_list_name);
         $pdf->SetCompression(true);
         $pdf->SetCreator('ProjectPier');
         $pdf->SetDisplayMode(fullpage, single);
         $pdf->SetSubject(active_project()->getObjectName());
         $pdf->SetFont('Arial', 'B', 16);
         $task_lists = active_project()->getOpenTaskLists();
         $pdf->Cell(0, 10, lang('project') . ': ' . active_project()->getObjectName(), 'C');
         $pdf->Ln();
         foreach ($task_lists as $task_list) {
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Write(10, lang('task list') . ': ' . $task_list->getObjectName());
             $pdf->Ln();
             $tasks = $task_list->getTasks();
             $line = 0;
             // Column widths
             $w = array(10, 0, 0);
             // Header
             //for($i=0;$i<count($header);$i++)
             //  $this->Cell($w[$i],7,$header[$i],1,0,'C');
             //$this->Ln();
             $pdf->SetFont('Arial', 'I', 14);
             foreach ($tasks as $task) {
                 $line++;
                 if ($task->isCompleted()) {
                     $task_status = lang('completed');
                     $pdf->SetTextColor(100, 200, 100);
                     $task_completion_info = lang('completed task') . ' : ' . format_date($task->getCompletedOn());
                 } else {
                     $task_status = lang('open');
                     $pdf->SetTextColor(255, 0, 0);
                     $task_completion_info = lang('due date') . ' : ' . lang('not assigned');
                     if ($task->getDueDate()) {
                         $task_completion_info = lang('due date') . ' : ' . format_date($task->getDueDate());
                     }
                 }
                 if ($task->getAssignedTo()) {
                     $task_assignee = $task->getAssignedTo()->getObjectName();
                 } else {
                     $task_assignee = lang('not assigned');
                 }
                 $pdf->Cell($w[0], 6, $line);
                 $pdf->Cell($w[2], 6, $task_status, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->Cell($w[2], 6, $task_completion_info, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->Cell($w[2], 6, $task_assignee, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->MultiCell($w[2], 6, $task->getText(), "TLRB");
                 $pdf->Ln();
             }
         }
         $pdf->Output($download_name, 'D');
     } else {
         $download_name = "{$project_name}-{$task_list_name}-tasks.txt";
         $download_type = 'text/csv';
         $download_contents = $task_list->getDownloadText($task_count, "\t", true);
         download_contents($download_contents, $download_type, $download_name, strlen($download_contents));
     }
     die;
 }
开发者ID:bklein01,项目名称:Project-Pier,代码行数:98,代码来源:TaskController.class.php

示例7: createEmptyRenderError

    public static function createEmptyRenderError($filename,$filepath){


        require_once(Yii::app()->basePath.'/extensions/Fpdf/fpdf.php');

        $pdf = new FPDF('P','mm','Letter');

        $pdf->SetAuthor('ASA AP');
        $pdf->SetTitle('Render error');
        //set font for the entire document
        $pdf->SetFont('Helvetica','B',20);
        $pdf->SetTextColor(255,0,0);
        //set up a page
        $pdf->AddPage('P');
        $pdf->SetDisplayMode(90,'default');

        //Set x and y position for the main text, reduce font size and write content
        $pdf->SetXY (30,55);
        $pdf->SetFontSize(15);
        $pdf->Write(5,'Existing document '.$filename.' can\'t be rendered');
        //Output the document
        $pdf->Output($filepath,'F');
        $pdf->Close();

        return $filepath;
    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:26,代码来源:FileModification.php

示例8: geraProcessosDetran

 /**
  * valida email
  * @param string $email
  */
 public function geraProcessosDetran($orgao, $resultado, $anexar, $id_empresa, $id_usuario, $id_pedido, $ordem, $res_oficio)
 {
     if ($orgao == '') {
         $orgao = 'Detran';
     }
     if ($resultado == '') {
         $resultado = 'Nada Constou';
     }
     // Variaveis de Tamanho
     $mesq = "10";
     // Margem Esquerda (mm)
     $msup = "10";
     // Margem Superior (mm) margem mínima dois pois ficou cortando)
     /*Uma dica: estes tamanhos você pode verificar com uma régua ou na própria caixa da etiqueta, seja bem preciso e sugiro que faça o teste na impressora que vai ser utilizada, pois pode acontecer de na impressão começar a subir ou descer, portanto, você deverá aumentar ou diminuir a altura da etiqueta.
      */
     $m = date(m);
     $mes = traduzMes($m);
     $anexoDAO = new AnexoDAO();
     $impressoDAO = new ImpressoDAO();
     $atividadeDAO = new AtividadeDAO();
     $res = $impressoDAO->buscaPorId(28);
     $imprimir_topo = $res->topo;
     $id_impresso = $res->id_impresso;
     $imprimir_timbre = $res->timbre;
     $imprimir_sub = $res->sub;
     $imprimir_linha = $res->linhas;
     $frase = '';
     #if($anexar!='on'){
     $pdf = new FPDF('P', 'cm', 'A4');
     //papel personalizado
     $pdf->Open();
     $pdf->SetMargins(1, 2);
     //seta as margens do documento
     $pdf->SetAuthor('Softfox 2011');
     $pdf->SetFont('times', '', 7);
     $pdf->SetDisplayMode(100, 'continuous');
     //define o nivel de zoom do documento PDF
     $coluna = 0;
     $linha = 0;
     $posicaoH = 0;
     $posicaoV = 0;
     #}
     $impressao_ordem = '';
     $linha = 0;
     $frase .= $imprimir_topo;
     $bloco = '';
     if ($res_oficio->id_pedido != '') {
         $linha_bloco = 1;
         $orgao_regiao = $res_oficio->certidao_cidade;
         $orgao_regiao .= '-' . $res_oficio->certidao_estado;
         $impressao_ordem = '#' . $res_oficio->id_pedido . '/' . $res_oficio->ordem . ' ';
         $responsavel_endereco = $res_oficio->endereco . ' ' . $res_oficio->numero . ' ' . $res_oficio->complemento;
         $data_atual = $res_oficio->cidade . ', ' . date(d) . ' de ' . $mes . ' de 20' . date(y) . '.';
         $topo = str_replace('<certidao_nome>', $res_oficio->certidao_nome, $imprimir_topo);
         $topo = str_replace('<certidao_cnpj>', $res_oficio->certidao_cnpj, $topo);
         $topo = str_replace('<certidao_cpf>', $res_oficio->certidao_cpf, $topo);
         $topo = str_replace('<orgao>', $orgao, $topo);
         $topo = str_replace("<resultado>", $resultado, $topo);
         $topo = str_replace("<orgao_regiao>", $orgao_regiao, $topo);
         $topo = str_replace('<responsavel_empresa>', $res_oficio->fantasia, $topo);
         $topo = str_replace('<responsavel_endereco>', $responsavel_endereco, $topo);
         $topo = str_replace('<responsavel_cidade>', $res_oficio->cidade, $topo);
         $topo = str_replace('<responsavel_estado>', $res_oficio->estado, $topo);
         $topo = str_replace("<data>", $data_atual, $topo);
         $topo = str_replace('<impressao_ordem>', $impressao_ordem, $topo);
         $sub = str_replace('<responsavel_empresa>', $res_oficio->fantasia, $imprimir_sub);
         $sub = str_replace('<responsavel_endereco>', $responsavel_endereco, $sub);
         $sub = str_replace('<responsavel_cidade>', $res_oficio->cidade, $sub);
         $sub = str_replace('<responsavel_estado>', $res_oficio->estado, $sub);
         $sub = str_replace('<responsavel_cep>', $res_oficio->cep, $sub);
         $sub = str_replace('<responsavel_tel>', $res_oficio->tel, $sub);
         $sub = str_replace('<responsavel_fax>', $res_oficio->fax, $sub);
         $sub = str_replace('<responsavel_email>', $res_oficio->email, $sub);
         $pdf->AddPage();
         $pdf->Image('../images/header.jpg', '0', '0', '19', '3,04', 'JPG');
         $pdf->SetFont('', 'B', 12);
         $pdf->Cell('', 2, 'NÃO EMITIMOS E NEM VENDEMOS CERTIDÕES E SIM PRAZOS E SOLUÇÕES', '', 1, 'C');
         $pdf->SetFont('', 'B', 14);
         $pdf->Cell('', 2, 'Declaração de Busca', '', 1, 'C');
         $pdf->SetFont('', '', 12);
         $pdf->Write(1, $topo, '');
         $pdf->SetFont('', '', 12);
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, '', '', 1, 'C');
         $pdf->Cell('', 1, $data_atual, '', 1, 'C');
         $pdf->Cell('', 1, $impressao_ordem, '', 1, 'R');
         $pdf->ln();
         $pdf->ln();
         $pdf->ln();
         $pdf->ln();
         $pdf->Cell('', 1, $res_oficio->fantasia, '', 1, 'C');
         $pdf->ln();
//.........这里部分代码省略.........
开发者ID:tricardo,项目名称:CartorioPostal_old,代码行数:101,代码来源:GeraAnexoCLASS.php

示例9: report_head

function report_head($report_id)
{
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM `squid_reports` WHERE ID='{$report_id}'"));
    build_progress($report_id, "Building Report...", 15);
    $pdf = new FPDF();
    $pdf->SetFont('times', '', 12);
    $pdf->SetTextColor(50, 60, 100);
    $linetime = report_by_category_pdf_range_dayz($report_id) . " - ( " . report_by_category_pdf_sumsize($report_id) . " )";
    //set up a page
    $pdf->AddPage('P');
    $pdf->SetTitle($ligne["report_name"]);
    $pdf->SetDisplayMode(real, 'default');
    $pdf->SetXY(5, 10);
    $pdf->SetFontSize(32);
    $pdf->Write(5, $ligne["report_name"]);
    $pdf->Ln();
    $pdf->Ln();
    $pdf->SetFontSize(18);
    $x1 = $pdf->GetX();
    $y1 = $pdf->GetY();
    $pdf->Line(0, $y1, 210, $y1);
    $pdf->SetFont('times', 'I', 12);
    $pdf->Write(15, $ligne["description"] . " {$linetime}");
    $pdf->SetFont('times', 'I', 12);
    $pdf->Write(15, " " . @implode(" and ", $GLOBALS["EXPLAIN_QUERY"]));
    $pdf->Ln();
    $pdf->SetFontSize(16);
    $pdf->SetFont('times', '', 12);
    return $pdf;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:exec.squid.reports-scheduled.php

示例10: dirname

            if ($classe->title === "") {
                $classe->title = $classe->name;
            }
        }
    }
}
$imgo = $map->drawlegend();
$nomer = $imgo->imagepath . "leg" . $nomeImagem . ".PNG";
$imgo->saveImage($nomer);
$pathlegenda = $dir_tmp . "/" . basename($imgo->imageurl) . "/" . basename($nomer);
$titulo = $_GET['titulo'];
substituiCon($map_file, $postgis_mapa);
require dirname(__FILE__) . '/../../pacotes/fpdf/fpdf.php';
$pdf = new FPDF("L", "mm", "A4");
$pdf->SetAutoPageBreak(false);
$pdf->SetDisplayMode(70, "single");
$pdf->SetMargins(0, 0, 0);
$pdf->AddPage("L");
$pdf->SetLineWidth(0.6);
$wMapaMax = 222;
$hMapaMax = 171;
$mapasize = getimagesize($pathMapa);
$wMapa = $mapasize[0];
$hMapa = $mapasize[1];
if ($wMapa / $wMapaMax > $hMapa / $hMapaMax) {
    $nW = $wMapaMax;
    $nH = $hMapa * $nW / $wMapa;
} else {
    $nH = $hMapaMax;
    $nW = $wMapa * $nH / $hMapa;
}
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:a4lpaisagempdf.php

示例11: FPDF

// Altura da Etiqueta (mm)
$ehet = "3,2";
// Espaço horizontal entre as Etiquetas (mm)
$pdf = new FPDF('P', 'mm', 'Letter');
// Cria um arquivo novo tipo carta, na
vertical . $pdf->Open();
// inicia documento
$pdf->AddPage();
// adiciona a primeira pagina
$pdf->SetMargins('5', '12,7');
// Define as margens do documento
$pdf->SetAuthor("Jonas Ferreira");
// Define o autor
$pdf->SetFont('helvetica', '', 7);
// Define a fonte
$pdf->SetDisplayMode($zoom, $layout = 'continuous');
$coluna = 0;
$linha = 0;
//MONTA A ARRAY PARA ETIQUETAS
while ($dados = mysql_fetch_array($busca)) {
    $nome = $dados["nomefantasia"];
    $ende = $dados["endereco"];
    $bairro = $dados["bairro"];
    $estado = $dados["estado"];
    $cida = $dados["cidade"];
    $local = $cida . " - " . $estado;
    $cep = "CEP: " . $dados["cep"];
    if ($linha == "10") {
        $pdf->AddPage();
        $linha = 0;
    }
开发者ID:lucasgama99,项目名称:sisodonto,代码行数:31,代码来源:print_etiqueta.php

示例12: exportFilePdf

 function exportFilePdf()
 {
     while (ob_get_level()) {
         ob_end_clean();
     }
     header("Content-Encoding: None", true);
     require JPATH_COMPONENT . DS . 'helpers' . DS . 'fpdf.php';
     include_once JPATH_COMPONENT . DS . 'helpers' . DS . 'font' . DS . 'helvetica.php';
     $quiz_id = intval(JRequest::getVar("id", ""));
     //create a FPDF object
     $pdf = new FPDF();
     //set font for the entire document
     $pdf->SetFont('Arial', 'B', 20);
     $pdf->SetTextColor(50, 60, 100);
     //set up a page
     $pdf->AddPage();
     $pdf->SetDisplayMode(real, 'default');
     $pdf->SetXY(10, 5);
     $pdf->SetFontSize(8);
     $db = JFactory::getDBO();
     $sql = "select name from #__guru_quiz where id=" . $quiz_id;
     $db->setQuery($sql);
     $name = $db->loadColumn();
     $name = $name["0"];
     $pdf->Write(5, 'Student Quiz Result for ' . "'" . $name . "'");
     $pdf->SetXY(10, 15);
     $pdf->SetFontSize(8);
     $pdf->Cell(20, 10, 'Times', 1, 0, 'C', 0);
     $pdf->Cell(20, 10, 'Students', 1, 0, 'C', 0);
     $pdf->Cell(20, 10, 'Avg Score', 1, 0, 'C', 0);
     //display the title with a border around it
     $res = guruAdminModelguruQuiz::NbOfTimesandStudents($quiz_id);
     $z = 25;
     $scoresByUserId = array();
     $maxNoOfTimes = 0;
     for ($i = 0; $i < count($res); $i++) {
         $newElem = new stdClass();
         $newElem->user_id = $res[$i]["user_id"];
         $newElem->scores = explode(",", $res[$i]["score_by_user"]);
         if (count($newElem->scores) > $maxNoOfTimes) {
             $maxNoOfTimes = count($newElem->scores);
         }
         array_push($scoresByUserId, $newElem);
     }
     $newvect = array();
     for ($i = 0; $i < $maxNoOfTimes; $i++) {
         $newElem = new stdClass();
         $newElem->noOfTimes = $i + 1;
         $newElem->noOfStudents = 0;
         $newElem->sumScores = 0;
         for ($j = 0; $j < count($scoresByUserId); $j++) {
             if (count($scoresByUserId[$j]->scores) >= $i + 1) {
                 $newElem->noOfStudents += 1;
                 $newElem->sumScores += $scoresByUserId[$j]->scores[$i];
             }
         }
         $newElem->avgScore = $newElem->sumScores / $newElem->noOfStudents;
         array_push($newvect, $newElem);
     }
     for ($i = 0; $i < count($newvect); $i++) {
         if ($i + 1 == 1) {
             $nboftimes = $i + 1 . "st";
         } elseif ($i + 1 == 2) {
             $nboftimes = $i + 1 . "nd";
         } elseif ($i + 1 == 3) {
             $nboftimes = $i + 1 . "rd";
         } elseif ($i + 1 > 3) {
             $nboftimes = $i + 1 . "th";
         }
         $studtot = $newvect[$i]->noOfStudents;
         $avg = intval($newvect[$i]->avgScore * 100);
         $pdf->SetXY(10, $z);
         $pdf->SetFontSize(7);
         $pdf->Cell(20, 10, $nboftimes, 1, 0, 'C', 0);
         $pdf->Cell(20, 10, $studtot, 1, 0, 'C', 0);
         $pdf->Cell(20, 10, $avg, 1, 0, 'C', 0);
         $z += 10;
     }
     $t = $z + 10;
     $pdf->SetXY(10, $t);
     $pdf->SetFontSize(7);
     $pdf->Cell(25, 10, 'First Name', 'LRTB', '', 'L', 0);
     $pdf->Cell(25, 10, 'Last Name', 'LRTB', '', 'L', 0);
     $pdf->Cell(39, 10, 'Email', 'LRTB', '', 'L', 0);
     $pdf->Cell(15, 10, '#', 'LRTB', '', 'L', 0);
     $pdf->Cell(20, 10, 'Username', 'LRTB', '', 'L', 0);
     $pdf->Cell(20, 10, 'Date Taken', 'LRTB', '', 'L', 0);
     $pdf->Cell(20, 10, 'Score', 'LRTB', '', 'L', 0);
     $pdf->Ln();
     //-----------------------------------------
     $pid = JRequest::getVar("pid", 0, 'post', 'int');
     $db = JFactory::getDBO();
     $sql = "select u.id, u.username, u.email, c.firstname, c.lastname, tq.date_taken_quiz, tq.score_quiz, tq.`id` as tq_id  from #__guru_customer c, #__users u, #__guru_quiz_taken tq where c.id=u.id and c.id = tq.user_id and u.id IN (select  user_id from #__guru_quiz_taken where quiz_id=" . $quiz_id . ") and tq.quiz_id=" . $quiz_id . " order by c.id desc";
     $db->setQuery($sql);
     $tmp = $db->loadObjectList();
     $new_id = 0;
     $nr = 1;
     for ($i = 0; $i < count($tmp); $i++) {
         $firstname = $tmp[$i]->firstname;
         $lastname = $tmp[$i]->lastname;
//.........这里部分代码省略.........
开发者ID:JozefAB,项目名称:qk,代码行数:101,代码来源:guruQuiz.php

示例13: GeneratePresentation

function GeneratePresentation($realty_id)
{
    global $app_list_strings;
    $pdf = new FPDF();
    $pdf->AddFont('TimesNewRomanPSMT', '', 'times.php');
    $pdf->AddFont('Times-Italic', 'I', 'timesi.php');
    $pdf->SetAuthor('OfficeWorld');
    $pdf->SetTitle('Presentation');
    $pdf->SetFont('TimesNewRomanPSMT', '', 25);
    $pdf->SetTextColor(100, 100, 100);
    $pdf->AddPage('L');
    $pdf->SetDisplayMode('real', 'default');
    $realty = new Realty();
    $realty->retrieve($realty_id);
    $image_main = '';
    $image_map = array();
    $image_plan = array();
    $images = array();
    $address = array();
    $currency = $realty->currency == 'RUR' ? 'рублей' : 'долларов';
    $operation_text = $app_list_strings['operation_realty_list'][$realty->operation];
    /*if($realty->address_country!='') $address[]=$realty->address_country;
    	if($realty->address_region!='') $address[]=$realty->address_region;
    	if($realty->address_city!='') $address[]=$realty->address_city;*/
    if ($realty->metro != '') {
        $address[] = $realty->metro;
    }
    if ($realty->address_street != '') {
        $address[] = $realty->address_street;
    }
    if ($realty->address_house != '') {
        $address[] = $realty->address_house;
    }
    if ($realty->address_apartment != '') {
        $address[] = "кв." . $realty->address_apartment;
    }
    $address = implode(', ', $address);
    if (is_dir('upload/gallery_images/' . $realty->id)) {
        $db_img = DBManagerFactory::getInstance();
        $sql_img = "SELECT galleria_c FROM realty_cstm WHERE id_c = '" . $realty->id . "'";
        $result_img = $db_img->query($sql_img);
        $row_img = $db_img->fetchByAssoc($result_img);
        $img_str = $row_img['galleria_c'];
        $image = explode('|', $img_str);
        foreach ($image as $key => $value) {
            $value = str_replace('^,^', '|', $value);
            $value = str_replace('^', '', $value);
            $image_t = explode('|', $value);
            if ($image_t[2] == 'main') {
                $image_main = $image_t[1];
            } elseif ($image_t[8] == 'on') {
                $image_map = $image_t;
            } elseif ($image_t[9] == 'on') {
                $image_plan = $image_t;
            } elseif ($image_t[7] == 'on') {
                $images[] = $image_t;
            }
        }
    }
    $pdf->SetXY(0, 5);
    $text = decode("{$operation_text}\n{$address}");
    $pdf->MultiCell(297, 7, $text, 0, 'C');
    $y = $pdf->GetY() + 5;
    if ($image_main != '') {
        $img = "upload/gallery_images/{$realty->id}/{$image_main}";
        list($w_i, $h_i) = getimagesize($img);
        if ($w_i - $h_i > $w_i * 0.3) {
            $y += (184 - $y - $h_i * 284 / $w_i) / 2;
            $pdf->Image($img, 6, 15 + $y, 284, 0);
        } else {
            $x = (284 - $w_i * (184 - $y) / $h_i) / 2;
            $pdf->Image($img, 6 + $x, $y, 0, 184 - $y);
        }
    }
    //Footer
    $pdf->Image('custom/Presentation/footer_main.png', 0, 172, 297, 0);
    //Page2
    $pdf->SetTextColor(255, 255, 255);
    if (isset($image_map[1])) {
        $pdf->AddPage('L');
        $img = "upload/gallery_images/{$realty->id}/{$image_map[1]}";
        list($w_i, $h_i) = getimagesize($img);
        if ($w_i - $h_i > $w_i * 0.3) {
            $y = (178 - $h_i * 284 / $w_i) / 2;
            $pdf->Image($img, 6, 15 + $y, 284, 0);
        } else {
            $x = (284 - $w_i * 178 / $h_i) / 2;
            $pdf->Image($img, 6 + $x, 15, 0, 178);
        }
        //Header
        $pdf->Image('custom/Presentation/header.png', 0, 0, 297, 0);
        $pdf->SetXY(0, 5);
        $pdf->SetFontSize(30);
        $text = decode($image_map[0]);
        $pdf->MultiCell(297, 7, $text, 0, 'C');
        //Footer
        $pdf->Image('custom/Presentation/footer.png', 0, 187, 297, 0);
    }
    //Page3
    if (isset($image_plan[1])) {
//.........这里部分代码省略.........
开发者ID:omusico,项目名称:sugar_work,代码行数:101,代码来源:generate.php

示例14:

		$gepiSchoolName=getSettingValue('gepiSchoolName');

	}

	// création du document
	$pdf->SetCreator($gepiSchoolName);
	// auteur du document
	$pdf->SetAuthor($gepiSchoolName);
	// mots clé
	$pdf->SetKeywords('');
	// sujet du document
	$pdf->SetSubject('Bilan journalier des absences');
	// titre du document
	$pdf->SetTitle('Bilan journalier des absences');
	// méthode d'affichage du document à son ouverture
	$pdf->SetDisplayMode('fullwidth', 'single');
	// compression du document
	$pdf->SetCompression(TRUE);
	// change automatiquement de page à 5mm du bas
	$pdf->SetAutoPageBreak(TRUE, 5);


/* **************************** */
/* début de la boucle des pages */

// comptage du nombre de page traité
$nb_page_traite = 0;

// initialiser la variable compteur de ligne passé pour le tableau
$nb_ligne_passe = 0;
开发者ID:rhertzog,项目名称:lcs,代码行数:30,代码来源:bilan_absences_quotidien_pdf.php

示例15: FPDF

    $study_type = "stc";
}
if ($_POST["search_study_type"] == 'Заочна') {
    $study_type = "zao";
}
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Alexandr Slovinskiy');
$pdf->SetTitle('Order Annex');
//set font for the entire document
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '');
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage('L');
$pdf->SetDisplayMode(real, 'default');
//display the title with a border around it
//Set x and y position for the main text, reduce font size and write content
$pdf->Image('img/form_1-12-2.jpg', 10, 15, 280);
$pdf->SetFontSize(9);
$pdf->SetXY(261, 29.5);
$pdf->Write(5, $_POST["order_number"]);
$pdf->SetXY(197.5, 37);
$pdf->Write(5, $_POST["day"]);
$pdf->SetXY(205, 37);
$pdf->Write(5, $_POST["month"]);
$pdf->SetXY(225.4, 37);
$pdf->Write(5, substr($_POST["year"], 2, 2));
$pdf->SetXY(196, 63);
if ($_POST["search_finance"] == 'b') {
    $pdf->Write(5, "за державним замовленням");
开发者ID:AlexSlovinskiy,项目名称:magistr.zu.edu.ua,代码行数:31,代码来源:AnnexPDF.php


注:本文中的FPDF::SetDisplayMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。