本文整理汇总了PHP中FPDF::ln方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::ln方法的具体用法?PHP FPDF::ln怎么用?PHP FPDF::ln使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::ln方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PrintTickets
function PrintTickets($bean, $event, $arguments)
{
if ($bean->print_tickets_c == 1) {
$sql = $GLOBALS['db']->query("SELECT c.first_name,c.last_name, cc.account_code_c,c.primary_address_state, e.name,e.ticket_type\n FROM e_enrolments e, e_events_e_enrolments_1_c ee,\n contacts_e_enrolments_1_c ce, contacts c, contacts_cstm cc\n WHERE (e.status = 'confirmed' OR e.status='PartPaid') AND e.id=ee.e_events_e_enrolments_1e_enrolments_idb\n AND ee.e_events_e_enrolments_1e_events_ida='{$bean->id}'\n and e.deleted=0 AND ce.deleted=0 AND c.deleted = 0\n AND ce.contacts_e_enrolments_1contacts_ida=c.id AND ce.contacts_e_enrolments_1e_enrolments_idb=e.id\n AND c.id=cc.id_c\n order by e.ticket_type");
$pdf = new FPDF();
while ($row = $GLOBALS['db']->fetchByAssoc($sql)) {
$gt = '';
if ($row['ticket_type'] == 'Resit') {
$gt = 'Graduate';
} elseif ($row['ticket_type'] == 'Elite') {
$gt = 'Elite';
}
$pdf->AddPage();
$pdf->SetAutoPageBreak(false);
$pdf->SetFont('Arial', '', 16);
$pdf->Code39(110, 5, $row['account_code_c']);
$pdf->ln(15);
$pdf->Cell(0, 0, $bean->name, 0, 1, 'R');
$pdf->SetFont('Arial', 'B', 8);
$pdf->ln(10);
$pdf->Cell(0, 0, 'Participant Agreement and Release Form - ' . $row['first_name'] . ' ' . $row['last_name'], 0, 1, 'L');
$pdf->ln(4);
$pdf->SetFont('Arial', '', 8);
$pdf->MultiCell(0, 4, 'Read the terms and conditions outlined below carefully. You may only proceed to enter the room where the training seminar is being held if you fully accept and agree to these terms and conditions in addition to the original terms and conditions which you signed upon purchasing the product.', 0, 'J');
$pdf->ln(3);
$pdf->MultiCell(0, 4, 'By signing the below I accept and agree to the following terms and conditions', 0, 'J');
$pdf->ln(3);
$pdf->Cell(5);
$pdf->Cell(5, 4, '1.', 0, 0, 'L');
$pdf->MultiCell(0, 4, 'You warrant that you have purchased this product for the sole purpose of self-education. You acknowledge that the nominated Training Package and (if applicable) other additional products are based on example or demonstration trades only. You warrant and represent that you will not engage in live trading based on any information or examples provided and that if you do so you indemnify Pumpkin Pty Ltd and its associated companies in relation to all claims and losses suffered by you or anyone else in relation to that trade.', 0, 'J');
$pdf->ln(3);
$pdf->Cell(20);
$pdf->Cell(20, 8, 'Signature', 0, 0, 'R');
$pdf->Cell(50, 8, '', 1, 0, 'L');
$pdf->Cell(30, 8, 'Date', 0, 0, 'R');
$pdf->Cell(30, 8, '', 1, 0, 'L');
$pdf->ln(20);
$pdf->SetFont('Arial', '', 30);
$pdf->Cell(105, 0, $row['first_name'], 0, 0, 'L');
$pdf->Cell(0, 0, $row['first_name'], 0, 0, 'L');
$pdf->ln(15);
$pdf->Cell(105, 0, $row['last_name'], 0, 0, 'L');
$pdf->Cell(0, 0, $row['last_name'], 0, 0, 'L');
$pdf->ln(10);
$pdf->Cell(60);
$pdf->SetFont('Arial', '', 16);
$pdf->Cell(105, 0, $row['primary_address_state'], 0, 0, 'L');
$pdf->Cell(0, 0, $row['primary_address_state'], 0, 0, 'L');
$pdf->Code39(5, 265, $row['account_code_c']);
$pdf->Code39(110, 265, $row['account_code_c']);
$pdf->ln(25);
$pdf->Cell(60);
$pdf->SetFont('Arial', '', 14);
$pdf->Cell(105, 0, $gt, 0, 0, 'L');
$pdf->Cell(0, 0, $gt, 0, 0, 'L');
}
$pdf->Output('cache/EventRef' . $bean->event_ref . 'Tickets.pdf', 'F');
$bean->print_tickets_c = 0;
if (!empty($bean->note_id_c)) {
$pdf = file_get_contents('cache/EventRef' . $bean->event_ref . 'Tickets.pdf');
file_put_contents('upload/' . $bean->note_id_c, $pdf);
} else {
$Notes = BeanFactory::getBean('Notes');
$Notes->name = 'EventRef' . $bean->event_ref . 'Tickets.pdf';
$Notes->file_mime_type = 'pdf';
$Notes->filename = 'EventRef' . $bean->event_ref . 'Tickets.pdf';
$Notes->parent_type = 'E_Events';
$Notes->parent_id = $bean->id;
$Notes->save();
$pdf = file_get_contents('cache/EventRef' . $bean->event_ref . 'Tickets.pdf');
file_put_contents('upload/' . $Notes->id, $pdf);
}
$bean->note_id_c = $Notes->id;
}
}
示例2: catch
$pdf->Cell(70, 5, "ASSUNTO", 1, 0, 'C');
$pdf->Cell(15, 5, "AUTUACAO", 1, 1, 'C');
foreach (Tramite::getProcessosGuiaRecibo() as $key => $processo) {
try {
$stmt = Controlador::getInstance()->getConnection()->connection->prepare("SELECT NUMERO_PROCESSO,I.INTERESSADO AS INTERESSADO,A.ASSUNTO AS ASSUNTO, DT_AUTUACAO\r\n FROM TB_PROCESSOS_CADASTRO PC\r\n INNER JOIN TB_PROCESSOS_ASSUNTO A ON A.ID = PC.ASSUNTO\r\n INNER JOIN TB_PROCESSOS_INTERESSADOS I ON I.ID = PC.INTERESSADO\r\n WHERE NUMERO_PROCESSO = ? LIMIT 1");
$stmt->bindParam(1, $processo, PDO::PARAM_INT);
$stmt->execute();
$out = $stmt->fetch(PDO::FETCH_ASSOC);
if (!empty($out)) {
$pdf->SetFont("Arial", "", 6);
$pdf->Cell(5, 5, ++$cont, 1, 'C');
$pdf->Cell(30, 5, $processo, 1, 0, 'C');
$pdf->Cell(70, 5, $out['INTERESSADO'], 1, 0, 'C');
$pdf->Cell(70, 5, $out['ASSUNTO'], 1, 0, 'C');
$pdf->SetFont("Arial", "", 5);
$pdf->Cell(15, 5, Util::formatDate($out['DT_AUTUACAO']), 1, 1, 'C');
}
} catch (PDOException $e) {
throw new Exception($e);
}
}
$pdf->Ln(10);
$pdf->Cell(5, 5, "", 0, 0, 'C');
$pdf->SetFont("Arial", "B", 6);
$pdf->Cell(180, 5, "COMPROVANTE DE RECEBIMENTO", 0, 0, 'C');
$pdf->Cell(5, 5, "", 0, 1, 'L');
$pdf->ln(5);
$pdf->SetFont("Arial", "", 7);
$pdf->Cell(95, 20, "ASSINATURA: _____________________________________________________", 0, 0, 'C');
$pdf->Cell(95, 20, utf8_decode("DATA: ________/ _______/ ________ HORÁRIO: ____ : ____ "), 0, 1, 'C');
$pdf->Output("Guia de Recibo.pdf", "I");
示例3: date
$pdf->SetFont('Times', 'B', 11);
$pdf->Image('../logo/malasngoding.png', 1, 1, 2, 2);
$pdf->SetX(4);
$pdf->MultiCell(19.5, 0.5, 'KIOS MALASNGODING', 0, 'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5, 0.5, 'Telpon : 0038XXXXXXX', 0, 'L');
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetX(4);
$pdf->MultiCell(19.5, 0.5, 'JL. KIOS MALASNGODING', 0, 'L');
$pdf->SetX(4);
$pdf->MultiCell(19.5, 0.5, 'website : www.malasngoding.com email : malasngoding@gmail.com', 0, 'L');
$pdf->Line(1, 3.1, 28.5, 3.1);
$pdf->SetLineWidth(0.1);
$pdf->Line(1, 3.2, 28.5, 3.2);
$pdf->SetLineWidth(0);
$pdf->ln(1);
$pdf->SetFont('Arial', 'B', 14);
$pdf->Cell(0, 0.7, 'Laporan Data Penjualan Barang', 0, 0, 'C');
$pdf->ln(1);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(5, 0.7, "Di cetak pada : " . date("D-d/m/Y"), 0, 0, 'C');
$pdf->ln(1);
$pdf->Cell(6, 0.7, "Laporan Penjualan pada : " . $_GET['tanggal'], 0, 0, 'C');
$pdf->ln(1);
$pdf->Cell(1, 0.8, 'NO', 1, 0, 'C');
$pdf->Cell(3, 0.8, 'Tanggal', 1, 0, 'C');
$pdf->Cell(6, 0.8, 'Nama Barang', 1, 0, 'C');
$pdf->Cell(3, 0.8, 'Jumlah', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'harga', 1, 0, 'C');
$pdf->Cell(4.5, 0.8, 'Total harga', 1, 0, 'C');
$pdf->Cell(4, 0.8, 'laba', 1, 1, 'C');
示例4:
$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, $responsavel_empresa, '', 1, 'C');
$pdf->ln();
$pdf->ln();
$pdf->Write(0.5, $sub, '');
$pdf->Line(1, 25, 20, 25);
$pdf->Ln();
$pdf->Cell('', 0.5, $rodape, '', 1, 'C');
$rodape = $responsavel_endereco . ', ' . $responsavel_cidade . '-' . $responsavel_estado . ' CEP: ' . $responsavel_cep;
$pdf->Cell('', 0.5, $rodape, '', 1, 'C');
$rodape = 'Tel/Fax: ' . $responsavel_tel . '/' . $responsavel_fax . ' E-mail:' . $responsavel_email;
$pdf->Cell('', 0.5, $rodape, '', 1, 'C');
$rodape = 'www.cartoriopostal.com.br';
示例5:
$pdf->Cell(5, 10, '', 0);
$pdf->Cell(70, 10, 'Universidad Nacional Autonoma de Honduras', 0);
$pdf->Ln(8);
$pdf->Cell(18, 10, '', 0);
$pdf->SetFont('Arial', '', 16);
$pdf->Cell(35, 10, '', 0);
$pdf->Cell(70, 10, 'Facultad de ciencias Juridicas', 0);
$pdf->Ln(13);
$pdf->SetFont('Arial', 'U', 14);
$pdf->Cell(30, 8, ' ', 0, 0, "C");
$pdf->Cell(125, 8, 'Plan operativo Anual', 0, 0, "C");
//$pdf->Rect(6, 45, 200, 230 ,'D');
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(10);
$pdf->cell(5, 8, '');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->cell(5, 8, '');
$pdf->Cell(70, 10, 'Actividades Faltantes', 0);
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(20);
$pdf->cell(10, 8, '');
$pdf->cell(20, 8, 'Codigo', 1);
$pdf->cell(30, 8, 'Correlativo', 1);
$pdf->cell(30, 8, 'Fecha Inicio', 1);
$pdf->cell(30, 8, 'Fecha Fin', 1);
$pdf->cell(70, 8, 'Descripcion', 1);
$pdf->ln(10);
$contador = 0;
while ($row = mysql_fetch_array($query)) {
$pdf->cell(10, 8, '');
示例6: date
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 0, utf8_decode("Teléfono: 2232-2290"), 0, 1, 'R');
$pdf->Ln(4.1);
$pdf->Cell(0, 0, utf8_decode("Edificio A-2"), 0, 1, 'R');
$pdf->Ln(4.1);
$pdf->Cell(0, 0, utf8_decode("Ciudad Universitaria"), 0, 1, 'R');
$pdf->Ln(4.1);
$pdf->Cell(0, 0, utf8_decode("Tegucigalpa, Honduras"), 0, 1, 'R');
$pdf->SetRightMargin(10);
$pdf->SetLeftMargin(10);
$pdf->Cell(18, 10, '', 0);
//$pdf->Ln(20);
//$pdf->SetFont('Arial', 'U', 14);
//$pdf->Cell(30, 8, ' ', 0,0,"C");
//$pdf->Cell(130, 8, ' Reporte de Estudiantes', 0,0,"C");
$pdf->ln(20);
$pdf->SetFont('Cambria', 'BI', 16);
$pdf->Cell(0, 0, utf8_decode("Reporte de Estudiantes"), 0, 1, 'C');
$pdf->Rect(5, 55, 206, 200, 'D');
$pdf->SetFont('Arial', '', 12);
$pdf->Ln(15);
$pdf->Cell(115, 15, 'Fecha: ' . date('Y-m-d'), 0);
$pdf->Ln(7);
$pdf->Ln(5);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(25, 8, 'Cuenta', 1, 0, "C");
$pdf->Cell(30, 8, 'Identidad', 1, 0, "C");
$pdf->Cell(45, 8, 'Estudiante', 1, 0, "C");
$pdf->Cell(40, 8, 'Correo', 1, 0, "C");
$pdf->Cell(10, 8, 'Indice', 1, 0, "C");
$pdf->Cell(33, 8, utf8_decode('Mención Horifica'), 1, 0, "C");
示例7: boletinSantaTeresita
function boletinSantaTeresita($idSalon, $periodo)
{
$area = new Area();
$areas = $area->leerAreas();
$pensum = new Pensum();
$pens = $pensum->leerPensum($idSalon);
$persona = new Persona();
$estudiantes = $persona->leerPorSalon($idSalon);
$nots = new Nota();
if ($periodo == "PRIMERO") {
$puestos = $nots->leerPromedios($idSalon, "primerP");
} elseif ($periodo == "SEGUNDO") {
$puestos = $nots->leerPromedios($idSalon, "segundoP");
} elseif ($periodo == "TERCERO") {
$puestos = $nots->leerPromedios($idSalon, "tercerP");
} elseif ($periodo == "CUARTO") {
$puestos = $nots->leerPromedios($idSalon, "cuartoP");
} elseif ($periodo == "FINAL") {
$puestos = $nots->leerPromediosFinal($idSalon);
}
$pdf = new FPDF('P', 'cm', 'Legal');
$pdf->SetMargins(0, 0, 0);
$puest = 0;
foreach ($puestos as $puesto) {
foreach ($estudiantes as $estudiante) {
if ($puesto["idPersona"] == $estudiante->getIdPersona()) {
$matricula = new Matricula();
$matr = $matricula->leerMatriculaPorId($estudiante->getIdPersona());
$salon = new Salon();
$sal = $salon->leerSalonePorId($idSalon);
$grado = new Grado();
$grad = $grado->leerGradoPorId($sal->getIdGrado());
$pdf->AddPage();
$pdf->SetFont("Arial", "B", 14);
$pdf->SetXY(1, 0);
$pdf->cell(18.5, 1, 'COLEGIO "SANTA TERESITA"', 0, 0, "C");
$pdf->ln();
$pdf->cell(4, 4, "", 0);
$pdf->Image('utiles/imagenes/escudoSantaTeresita.jpg', 1, 0, 2.5);
$pdf->SetFont("Arial", "", 10);
//CAbecera
$pdf->SetXY(1, 1);
$pdf->Cell(18.5, 1, utf8_decode('"EDUCAMOS PARA HACER POSIBLE LA VIDA Y LA FELICIDAD"'), 0, 1, "C");
$pdf->SetXY(1, 1.5);
$pdf->Cell(18.5, 1, "INFORME EVALUATIVO", 0, 1, "C");
$pdf->SetXY(16, 0);
$pdf->SetFont("Arial", "", 10);
$pdf->Cell(4, 1, "Bajo(Db): 10 - 69 ", 0, 0, "C");
$pdf->SetXY(16, 0.5);
$pdf->Cell(4, 1, "Basico(DB): 70 - 79 ", 0, 0, "C");
$pdf->SetXY(16, 1);
$pdf->Cell(4, 1, "Alto(DA): 80 - 94 ", 0, 0, "C");
$pdf->SetXY(16, 1.5);
$pdf->Cell(4, 1, "Superior(DS): 95 - 100", 0, 0, "C");
$pdf->SetXY(16, 0);
$pdf->Cell(4, 2.5, "", 1, 0, "C");
if ($periodo == "PRIMERO") {
$periodo3 = "1";
}
if ($periodo == "SEGUNDO") {
$periodo3 = "2";
}
if ($periodo == "TERCERO") {
$periodo3 = "3";
}
if ($periodo == "CUARTO") {
$periodo3 = "4";
}
if ($periodo == "FINAL") {
$periodo3 = "F";
}
$x = 1;
$y = 2.75;
$pdf->SetXY($x, $y);
$pdf->SetFont("Arial", "", 10);
$pdf->Cell(3.3, 0.5, "Apellidos y Nombre:", 0, 0, "L");
$pdf->SetFont("Arial", "B", 10);
$pdf->Cell(8, 0.5, utf8_decode(strtoupper($estudiante->getPApellido() . " " . $estudiante->getSApellido() . " " . $estudiante->getNombres())), 0, 0, "L");
$pdf->SetXY($x, $y);
$pdf->Cell(12.8, 0.5, "", 1, 0, "L");
$pdf->SetFont("Arial", "", 10);
$pdf->Cell(1.2, 0.5, "Grado:", 0, 0, "L");
$pdf->SetFont("Arial", "B", 10);
$pdf->Cell(0.8, 0.5, $idSalon, 0, 0, "L");
$pdf->SetXY($x + 12.8, $y);
$pdf->Cell(2.2, 0.5, "", 1, 0, "L");
$pdf->SetFont("Arial", "", 10);
$pdf->Cell(1.5, 0.5, "Periodo:", 0, 0, "L");
$pdf->SetFont("Arial", "B", 10);
$pdf->Cell(0.5, 0.5, $periodo3, 0, 0, "L");
$pdf->SetXY($x + 15, $y);
$pdf->Cell(2, 0.5, "", 1, 0, "L");
$pdf->SetFont("Arial", "", 10);
$pdf->Cell(1, 0.5, utf8_decode("Año:"), 0, 0, "L");
$pdf->SetFont("Arial", "B", 10);
$pdf->Cell(1, 0.5, $matr->getAnoLectivo(), 0, 0, "L");
$pdf->SetXY($x + 17, $y);
$pdf->Cell(2, 0.5, "", 1, 0, "L");
$pdf->SetFont("Arial", "B", 9);
$y += 0.5;
//.........这里部分代码省略.........
示例8: FPDF
$pdf=new FPDF();
$pdf->AddFont('ArialMT','','arial.php');
$pdf->AddFont('Arial-BoldMT','','arialbd.php');
$pdf->AddFont('Arial-BoldItalicMT','','arialbi.php');
$pdf->AddPage();
$pdf->SetFont('Arial-BoldMT','',14); // задаем шрифт и его размер
$reportName="НАКЛАДНАЯ /ОБРАЗЦЫ /";
$pdf->Cell( 0, 15, $reportName, 0, 0, 'C' );
$pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер
$pdf->Cell(10,20,'',0,1,'l');
$pdf->ln(0);
$pdf->Cell(10,5,'',0,0,'l');
$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,5,'Дата составления заявки',1,0,'l');
$pdf->SetTextColor(22,50,255); // синий
$pdf->Cell(90,5,date("d-m-Y",time()),1,0,'l');
$pdf->ln(5);
$pdf->Cell(10,30,'',0,0,'l');
$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,25,'Название фирмы',1,0,'l');
$pdf->Image('logo.jpg',80,37,'70','');
$pdf->Cell(90,25,'',1,0,'l');
$pdf->ln(20);
示例9: etatFinancierAction
/**
* @param mixed $id The entity id
* @Template() *
* @Route("/etatfinancier", name="etatfinancier")
*/
public function etatFinancierAction()
{
$date = new \DateTime();
$etatfinancier = $this->get("alb_inscriptions.alb_manager")->getEtatFinancierApplication();
$nomfichier = 'tresorerie/EF_' . $date->format('YmdHis') . '.pdf';
$pdf = new \FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 20);
$pdf->Cell(0, 8, utf8_decode('Amicale Laïque de Billère'), 0, 1, 'C');
$pdf->ln(4);
$pdf->SetFont('Arial', '', 16);
$pdf->Cell(0, 8, utf8_decode('Etat financier au ' . $date->format('d/m/Y')), 0, 1);
$pdf->ln(4);
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(5, 4, '', 1, 0, 'C');
$pdf->Cell(45, 4, utf8_decode('Nom'), 1, 0, 'C');
$pdf->Cell(31, 4, utf8_decode('Prénom'), 1, 0, 'C');
$pdf->Cell(15, 4, utf8_decode('Montant'), 1, 1, 'C');
$i = 0;
$total = 0;
foreach ($etatfinancier as $etatfinancier0) {
foreach ($etatfinancier0 as $etat) {
if ($etat['montant'] != 0) {
$i++;
$total = $total + $etat['montant'];
$pdf->Cell(5, 4, $i, 1, 0, 'C');
$pdf->Cell(45, 4, utf8_decode($etat['nom']), 1, 0, '');
$pdf->Cell(31, 4, utf8_decode($etat['prenom']), 1, 0, '');
$pdf->Cell(15, 4, number_format($etat['montant'], 2, ',', ' '), 1, 1, 'R');
}
}
}
$pdf->ln(4);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(45, 6, utf8_decode('Total : '), 0, 0, 'R');
$pdf->Cell(20, 6, number_format($total, 2, ',', ' '), 0, 1, 'R');
$pdf->Output($nomfichier, 'F');
$response = new Response();
$response->setContent(file_get_contents($nomfichier));
$response->headers->set('Content-Type', 'application/force-download');
$response->headers->set('Content-disposition', 'filename=' . $nomfichier);
return $response;
}
示例10: trim
$pdf->Cell(25, 5, trim(db_formatar($vd1, 'f')), 1, 0, "R", 0);
$pdf->Cell(25, 5, trim(db_formatar($vb1, 'f')), 1, 0, "R", 0);
$pdf->Cell(10, 5, "", 1, 0, "C", 0);
$pdf->Cell(25, 5, db_formatar($vi1, 'f'), 1, 0, "R", 0);
$pdf->Cell(10, 5, "", 1, 0, "C", 0);
$pdf->Cell(25, 5, db_formatar($vt1, 'f'), 1, 1, "R", 0);
}
//######################################################################
//total
$qtotal = @$qT + @$qP;
$vb2 = @$vb + $vb1;
$vd2 = @$vd + $vd1;
$vs2 = @$vs + $vs1;
$vt2 = @$vt + $vt1;
$vi2 = @$vi + $vi1;
$pdf->ln(10);
$pdf->Setx(5);
$pdf->Cell(137, 5, "QUANTIDADE DE ITENS: " . $qtotal, 1, 0, "L", 0);
$pdf->Cell(29, 5, trim(db_formatar($vs2, 'f')), 1, 0, "R", 0);
$pdf->Cell(25, 5, trim(db_formatar($vd2, 'f')), 1, 0, "R", 0);
$pdf->Cell(25, 5, trim(db_formatar($vb2, 'f')), 1, 0, "R", 0);
$pdf->Cell(10, 5, "", 1, 0, "C", 0);
$pdf->Cell(25, 5, db_formatar($vi2, 'f'), 1, 0, "R", 0);
$pdf->Cell(10, 5, "", 1, 0, "C", 0);
$pdf->Cell(25, 5, db_formatar($vt2, 'f'), 1, 1, "R", 0);
$y = $pdf->GetY();
$pdf->SetY($y + 3);
$pdf->Setx(5);
// if(!isset($DB_mens1)){
// $DB_mens1 = "";
// }
示例11: ybuy_do_pdf
function ybuy_do_pdf($id)
{
global $wpdb, $ybuy_country_list;
$query = 'SELECT * FROM ' . $wpdb->prefix . 'ybuy_purchase yp
LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_download_assoc pda ON yp.id = pda.purchase_id
LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_product_assoc ppa ON ppa.purchase_id = yp.id
LEFT JOIN ' . $wpdb->prefix . 'ybuy_product prod ON prod.id = ppa.product_id
LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_attribute attr ON attr.purchase_id = yp.id
WHERE yp.id = ' . $id . ' AND attr.attribute_id = 2';
$rows = $wpdb->get_results($query);
$row = $rows[0];
if ($row->current_status_id != 2) {
// payment not complete
return FALSE;
}
$user_data = get_userdata($row->user_id);
include YBUY_INCLUDES_DIR . 'fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$font = 10;
$pdf->SetFont('Arial', '', $font);
$pdf->SetFont('Arial', 'B', $font);
$cell = 45;
$cell_1 = 10;
$cell_2 = 50;
$cell_3 = 150;
$line_h = $font / 3 + 1;
$pdf->Image('http://www.codingfutures.co.uk/wp-content/themes/codingfutures/images/logo-small.jpg', 10, 10, 60, 40);
$pdf->Cell($cell, $line_h);
$pdf->ln();
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'Coding Futures');
$pdf->SetFont('Arial', '', $font);
$pdf->ln();
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, '91 Kirkstall Road');
$pdf->ln();
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'The Tannery');
$pdf->ln();
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'Leeds');
$pdf->ln();
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'LS3 1HS');
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->SetFont('Arial', 'b', $font);
$pdf->Cell(1, $line_h, $user_data->ybuy_company);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'Invoice: ybuy_' . $id);
$pdf->SetFont('Arial', '', $font);
$pdf->ln();
$pdf->Cell(1, $line_h, $user_data->ybuy_address_1);
$pdf->ln();
$pdf->Cell(1, $line_h, $user_data->ybuy_address_2);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, date('d/m/Y', time()));
$pdf->ln();
$pdf->Cell(1, $line_h, $user_data->ybuy_city);
$pdf->ln();
$pdf->Cell(1, $line_h, $user_data->ybuy_region);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell($cell);
$pdf->Cell(1, $line_h, 'Payment Made On: ' . date('d/m/Y', time()));
$pdf->ln();
$pdf->Cell(1, $line_h, $ybuy_country_list[$user_data->ybuy_country]);
$pdf->ln();
$pdf->Cell(1, $line_h, $user_data->ybuy_post_code);
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$char = 163;
$cur = 'GBP';
$vat = 20;
if ($row->currency_id == 2) {
//.........这里部分代码省略.........
示例12: FPDF
/* конец нижней части */
/*начало шапки*/
$pdf=new FPDF();
$pdf->AddFont('ArialMT','','arial.php');
$pdf->AddFont('Arial-BoldMT','','arialbd.php');
$pdf->AddFont('Arial-BoldItalicMT','','arialbi.php');
$pdf->AddPage();
$pdf->SetFont('Arial-BoldMT','',14); // задаем шрифт и его размер
$reportName="НАКЛАДНАЯ /ОБРАЗЦЫ /";
$pdf->Cell( 0, 15, $reportName, 0, 0, 'C' );
$pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер
$pdf->Cell(10,20,'',0,1,'l');
$pdf->ln(0);
$pdf->Cell(10,5,'',0,0,'l');
$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,5,'Дата составления заявки',1,0,'l');
$pdf->SetTextColor(22,50,255); // синий
$pdf->Cell(90,5,date("d-m-Y",time()),1,0,'l');
$pdf->ln(5);
$pdf->Cell(10,30,'',0,0,'l');
$pdf->SetTextColor(214,3,0); // красный
$pdf->Cell(50,25,'Название фирмы',1,0,'l');
$pdf->Image('logo.jpg',80,37,'70','');
$pdf->Cell(90,25,'',1,0,'l');
$pdf->ln(20);
示例13: statistiqueParticipationsAction
/**
* @Template() *
* @Route("/statistique-participations/", name="statistiqueparticipations")
*/
public function statistiqueParticipationsAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
$user = $this->getUser();
$id = $user->getId();
$activites = $this->get("alb_inscriptions.alb_manager")->getActivitesAdherent($id);
$bureau = $this->get("alb_inscriptions.alb_manager")->isBureau($id, $activites);
if ($bureau) {
$groupes = $this->get("alb_inscriptions.alb_manager")->getGroupesAdherent($id);
$activitesgroupe = $em->getRepository('ALBInscriptionsBundle:Activites')->findByIdgroupes($groupes);
foreach ($activitesgroupe as $activite) {
$activites[] = $activite->getId();
}
}
$activites = $this->get("alb_inscriptions.alb_manager")->getListeActivites($activites);
} else {
$activites = $em->getRepository('ALBInscriptionsBundle:Activites')->findAll();
$groupes = $em->getRepository('ALBInscriptionsBundle:Groupes')->findAll();
}
if ('POST' === $request->getMethod()) {
$activite = $request->get('activite');
$groupe = $request->get('groupe');
if ($activite > 0) {
$nomactivite = $em->getRepository('ALBInscriptionsBundle:Activites')->find($activite)->getActivite();
} elseif ($groupe > 0) {
$nomactivite = $em->getRepository('ALBInscriptionsBundle:groupes')->find($groupe)->getGroupe();
} else {
$nomactivite = 'Toutes';
}
$datedebut = $request->get('datedebut');
$datefin = $request->get('datefin');
$nb = 0;
if ($activite > 0) {
$participants = $this->get("alb_inscriptions.alb_manager")->getListeParticipantsActivite($activite);
} else {
$participants = $this->get("alb_inscriptions.alb_manager")->getListeParticipants($groupe);
}
$nomfichier = 'statistiques/' . $activite . '.pdf';
$pdf = new \FPDF();
$pdf->Open();
$pdf->SetTopMargin(5);
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 14);
$pdf->Cell(0, 5, utf8_decode('Amicale Laïque de Billère'), 0, 1, 'C');
$pdf->ln(2);
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 5, utf8_decode('Liste des présences aux sorties ' . $nomactivite . ' entre le ' . substr($datedebut, 8, 2) . '/' . substr($datedebut, 5, 2) . '/' . substr($datedebut, 0, 4) . ' et le ' . substr($datefin, 8, 2) . '/' . substr($datefin, 5, 2) . '/' . substr($datefin, 0, 4)), 0, 1);
$pdf->ln(2);
$pdf->SetFont('Arial', '', 8);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(5, 4, '', 1, 0, 'C');
$pdf->Cell(50, 4, utf8_decode('Nom Prénom'), 1, 0, 'C');
//$pdf->Cell(20,4,utf8_decode('Activité'),1,0,'C');
$pdf->Cell(30, 4, utf8_decode('Nb de présence'), 1, 1, 'C');
$pdf->SetFont('Arial', '', 8);
$i = 0;
$encadrement = false;
foreach ($participants as $participant) {
if ($participant->getAidemeneur() and !$encadrement) {
$pdf->Cell(55, 4, 'TOTAL', 1, 0, 'R');
$pdf->Cell(30, 4, $nb, 1, 1, 'C');
$nb = 0;
$encadrement = true;
$i = 0;
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(85, 5, 'ENCADREMENT', 0, 1, 'C');
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(5, 4, '', 1, 0, 'C');
$pdf->Cell(50, 4, utf8_decode('Nom Prénom'), 1, 0, 'C');
//$pdf->Cell(20,4,utf8_decode('Activité'),1,0,'C');
$pdf->Cell(30, 4, utf8_decode('Nb de présence'), 1, 1, 'C');
}
$i++;
$pdf->Cell(5, 4, $i, 1, 0, 'C');
$pdf->Cell(50, 4, utf8_decode($participant->getIdadherent()->getNom() . ' ' . $participant->getIdadherent()->getPrenom()), 1, 0, '');
$id = $participant->getId();
if ($activite > 0) {
$nbparticipation = $this->get("alb_inscriptions.alb_manager")->getNbParticipationActivite($activite, $id, $datedebut, $datefin);
} else {
$nbparticipation = $this->get("alb_inscriptions.alb_manager")->getNbParticipationGroupe($groupe, $id, $datedebut, $datefin);
}
$pdf->Cell(30, 4, $nbparticipation, 1, 1, 'C');
$nb = $nb + $nbparticipation;
}
$pdf->Cell(55, 4, 'TOTAL', 1, 0, 'R');
$pdf->Cell(30, 4, $nb, 1, 1, 'C');
$pdf->Output($nomfichier, 'F');
$response = new Response();
$response->setContent(file_get_contents($nomfichier));
$response->headers->set('Content-Type', 'application/force-download');
$response->headers->set('Content-disposition', 'filename=' . $nomfichier);
return $response;
}
return array('activites' => $activites, 'groupes' => $groupes);
}
示例14: FPDF
<?php
include '../conexion/db.php';
require '../fpdf17/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 16);
$pdf->Image("../dist/img/ICONO2.png", 10, 8, 10, 10, 'PNG');
$pdf->Cell(60, 10, '', 0);
$pdf->Cell(90, 10, 'Efood - Administracion', 0);
$pdf->ln(15);
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(70, 10, '', 0);
$pdf->Cell(90, 10, 'Ventas realizadas', 0);
$pdf->ln(30);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(30, 10, 'N. Venta', 0);
$pdf->Cell(70, 10, 'Cliente', 0);
$pdf->Cell(30, 10, 'Fecha', 0);
$pdf->Cell(30, 10, 'Total C.', 0);
$pdf->ln(8);
//Consulta a la BD
/*$pdf->SetFont('Arial','',12);
$ventas=pg_query("Select * form ventas ")
while ($ventas2=pg_fetch_row($ventas)) {
$pdf->Cell(30,10,$ventas2['id'],0);
$pdf->Cell(70,10,$ventas2['cliente'],0);
$pdf->Cell(30,10,$ventas2['fecha'],0);
$pdf->Cell(30,10,$ventas2['totalp'],0);
$pdf->ln(8);
示例15: createpdf
function createpdf($id_gr)
{
require '../fpdf/fpdf.php';
//permite criar uma font a partir das font do windows
//require('../fpdf/makefont/makefont.php');
//MakeFont('../fpdf/arial.ttf','iso-8859-1', true);
if (strpos($id_gr, '-') !== false) {
$grepdb = grepGetByGrNumber($id_gr);
} else {
$grepdb = grepGetById($id_gr);
}
//$grepdb = grepGetById($id_gr);
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('arial', '', 12);
$pdf->Cell(0, 10, $pdf->Image('../images/eleclerc.jpg', 6, 10, 50), 0, 0, 'L');
//$pdf->Cell(0,10,utf8_decode('Guia de Reparação nº19') ,0 ,0 ,'R');
if ($grepdb['gr_number'] == "") {
$pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['id']), 0, 0, 'R');
} else {
$pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['gr_number']), 0, 0, 'R');
}
$pdf->Ln(15);
$pdf->Cell(155, 10, utf8_decode($_SESSION['morada_leclerc_pdf']), 0, 0, 'L');
$pdf->Cell(2, 10, utf8_decode('Data: ' . invertedatasemhora($grepdb['date_in'])), 0, 0, 'L');
$pdf->Ln(6);
$pdf->Cell(0, 10, utf8_decode($_SESSION['cod_postal_leclerc_pdf']), 0, 0, 'L');
$pdf->Ln(6);
$pdf->Cell(0, 10, utf8_decode('Tel: ' . $_SESSION['telefone_leclerc_pdf'] . ' Fax: ' . $_SESSION['fax_leclerc_pdf']), 0, 0, 'L');
$pdf->Ln(6);
$pdf->Cell(0, 10, utf8_decode($_SESSION['mail_leclerc_pdf']), 0, 0, 'L');
$pdf->Ln(6);
$pdf->Cell(0, 10, utf8_decode('NIF: ' . $_SESSION['nif_leclerc_pdf']), 0, 0, 'L');
//cliente
$pdf->Ln(15);
$pdf->SetFont('arial', '', 20);
$pdf->Cell(0, 10, utf8_decode('Cliente'), 0, 0, 'L');
$pdf->Ln(2);
$pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L');
$pdf->Ln(10);
$pdf->SetFont('arial', '', 12);
$pdf->Cell(0, 10, utf8_decode('Nome: ' . $grepdb['cl_name']), 0, 0, 'L');
$pdf->Ln(10);
$pdf->Cell(0, 10, utf8_decode('Morada: ' . $grepdb['cl_morada']), 0, 0, 'L');
$pdf->Ln(10);
//o multicell permite ser só uma linha ou caso acaba a linha cria logo uma por baixo
$pdf->Cell(80, 10, utf8_decode('Localidade: ' . $grepdb['cl_localidade']));
$pdf->Cell(2, 10, utf8_decode('Cod. Postal: ' . codpostalToForm($grepdb['cl_codpostal'])));
$pdf->Ln(10);
$pdf->Cell(0, 10, utf8_decode('Contacto: ' . $grepdb['cl_telefone']), 0, 0, 'L');
$pdf->Ln(15);
$pdf->SetFont('arial', '', 20);
//artigo
$pdf->Cell(0, 10, utf8_decode('Artigo'), 0, 0, 'L');
$pdf->Ln(2);
$pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L');
$pdf->Ln(10);
$pdf->SetFont('arial', '', 12);
$pdf->Cell(80, 10, utf8_decode('Marca: ' . $grepdb['art_marca']));
$pdf->Cell(2, 10, utf8_decode('Tipo: ' . $grepdb['art_type']));
$pdf->ln(10);
$pdf->Cell(80, 10, utf8_decode('Modelo: ' . $grepdb['art_modelo']));
$pdf->Cell(2, 10, utf8_decode('EAN: ' . $grepdb['art_ean']));
$pdf->ln(10);
$pdf->MultiCell(0, 10, utf8_decode('Nº Série: ' . $grepdb['art_numserie']));
$pdf->MultiCell(0, 10, utf8_decode('Anomalia: ' . $grepdb['art_anomalia']));
$pdf->MultiCell(0, 10, utf8_decode('Acessórios: ' . $grepdb['art_acessor']));
$pdf->MultiCell(0, 10, utf8_decode('Estética: ' . $grepdb['art_estetic']));
//$image_photo = $pdf->Image('../images/euro.jpg',$pdf->GetX(), $pdf->GetY(), 'R');
$pdf->Cell(80, 10, utf8_decode('Talão: ' . $grepdb['art_numtalao']));
$pdf->Cell(2, 10, utf8_decode('Valor: ' . $grepdb['art_valor']));
$pdf->Ln(10);
if ($grepdb['art_garantie'] == 1) {
$pdf->Cell(80, 10, utf8_decode('Garantia: Sim'));
$pdf->Cell(2, 10, utf8_decode('Data: ' . $grepdb['art_dategar']));
} else {
$pdf->Cell(0, 10, utf8_decode('Garantia: Não'), 0, 0, 'L');
}
$pdf->Ln(10);
if ($grepdb['art_orcamento'] == 1) {
$pdf->Cell(0, 10, utf8_decode('Orçamento: Sim'), 0, 0, 'L');
} else {
$pdf->Cell(0, 10, utf8_decode('Orçamento: Não'), 0, 0, 'L');
}
$pdf->Ln(20);
$pdf->Cell(20, 10, utf8_decode(' '));
$pdf->Cell(80, 10, utf8_decode('Assinatura Cliente:'));
$pdf->Cell(2, 10, utf8_decode('Assinatura Funcionário:'));
$pdf->Ln(20);
$pdf->Cell(20, 10, utf8_decode(' '));
$pdf->Cell(80, 10, utf8_decode('________________'));
$pdf->Cell(2, 10, utf8_decode('____________________'));
return $pdf;
}