本文整理汇总了PHP中FPDF::Open方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::Open方法的具体用法?PHP FPDF::Open怎么用?PHP FPDF::Open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::Open方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate_pdf
function generate_pdf($prenote)
{
require_once 'fpdf17/fpdf.php';
$pdf = new FPDF();
$length = count($prenote->product);
$pdf->Open();
$pdf->AddPage('P', array(50, 49 + $length * 8));
$pdf->SetFont('Arial', '', 9);
$pdf->Image($prenote->folio . '.png', 3, 2, 35, 15, 'PNG');
$pdf->Text(7, 20, $prenote->folio);
$pdf->Text(5, 24, $prenote->clientName);
$pdf->Text(5, 26, '------------------------------');
$product = $prenote->product;
$c = 0;
for ($i = 0; $i < $length; $i++) {
$pdf->Text(5, 29 + $c, utf8_decode($product[$i]->Description));
$pdf->Text(5, 33 + $c, $product[$i]->scanCode);
$pdf->Text(20, 33 + $c, $product[$i]->Quantity);
$precio_cantidad = $product[$i]->Quantity * $product[$i]->Price;
$pdf->Text(28, 33 + $c, '$' . $precio_cantidad);
$c += 8;
}
$c -= 8;
$pdf->Text(5, 35 + $c, '------------------------------');
$pdf->Text(25, 38 + $c, $prenote->narticles);
$pdf->Text(5, 38 + $c, '$' . $prenote->total);
$pdf->Text(5, 42 + $c, $prenote->id_employee);
$pdf->Text(10, 42 + $c, $prenote->employeeName);
$pdf->Text(5, 46 + $c, $prenote->store_id);
$pdf->Text(10, 46 + $c, $prenote->store_name);
$pdf->Text(5, 50 + $c, $prenote->cotizationNumber);
$pdf->Text(5, 54 + $c, $prenote->date);
$pdf->Output($prenote->folio . '.pdf', 'F');
}
示例2:
function class_pdf_maker($orientation = 'P', $unit = 'in', $format = 'letter')
{
parent::FPDF($orientation, $unit, $format);
parent::SetMargins(0, 0);
parent::Open();
parent::AddPage();
parent::SetAutoPageBreak(FALSE);
}
示例3: Open
function Open($file)
{
if (FPDF_VERSION < '1.53') {
$this->Error('Version 1.53 or above is required by this extension');
}
$this->f = fopen($file, 'wb');
if (!$this->f) {
$this->Error('Unable to create output file: ' . $file);
}
parent::Open();
$this->_putheader();
}
示例4: Open
public function Open($file = 'doc.pdf')
{
if (FPDF_VERSION < '1.7') {
$this->Error('Version 1.7 or above is required by this extension');
}
$this->file = fopen($file, 'wb');
if (!$this->file) {
$this->Error("Unable to create output file: {$file}");
}
parent::Open();
$this->_putheader();
}
示例5: __construct
/**
* Constructor method
* @param $orientation Page orientation
* @param $format Page format
* @author Pablo Dall'Oglio
*/
public function __construct($orientation = 'P', $format = 'a4')
{
parent::__construct($orientation, 'pt', $format);
$this->setLocale();
parent::SetAutoPageBreak(true);
parent::SetMargins(0, 0, 0);
parent::SetCreator('Adianti Studio PDF Designer');
// parent::SetTitle('Letter');
// parent::SetKeywords('www.xyz.com.br');
parent::SetFillColor(255, 255, 255);
parent::Open();
parent::AliasNbPages();
parent::SetX(20);
$this->replaces = array();
$this->href = '';
$this->anchors = array();
$this->orientation = $orientation;
$this->format = $format;
parent::SetFont('Arial', '', 10 * 1.3);
}
示例6: UsersTrafficPeriodPDF
function UsersTrafficPeriodPDF()
{
//require('chart.php');
require 'lib/fpdf.php';
global $SAMSConf;
global $DATE;
$DB = new SAMSDB();
$sdate = $DATE->sdate();
$edate = $DATE->edate();
$bdate = $DATE->BeginDate();
$eddate = $DATE->EndDate();
$size = "";
if (isset($_GET["size"])) {
$size = $_GET["size"];
}
require "reportsclass.php";
$dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
$lang = "./lang/lang.{$SAMSConf->LANG}";
require $lang;
define('FPDF_FONTPATH', 'lib/font/');
require 'lib/fpdf.php';
$pdfFile = new FPDF();
$pdfFile->Open();
$pdfFile->AddFont('Nimbus', '', 'Nimbus.php');
$pdfFile->SetAuthor("SQUID Account Management System");
$pdfFile->SetCreator("Created by SAMS2");
$pdfFile->SetTitle("SAMS2 users statistic");
// UsersTrafficPeriodPDF();
$pdfFile->AddPage();
$pdfFile->SetFont('Nimbus', '', 15);
//$pdfFile->SetFont('SUSESerif-Roman','',16);
$pdfFile->SetXY(50, 15);
echo " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}<br>";
$pdfFile->Write(0, " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}");
$pdfFile->Output();
}
示例7: 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);
}
示例8: 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;
}
示例9: create5160MailingLabelFile
public function create5160MailingLabelFile($results, $name = "dummy_")
{
$name .= date("M_d_Y") . ".pdf";
$fpdf = new FPDF();
$fpdf->Open();
$fpdf->AddPage();
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->SetMargins(0, 0);
$fpdf->SetAutoPageBreak(false);
$x = 0;
$y = 0;
// create the array of the ids want to query the database for addresses
foreach ($results as $student) {
$st = new PSUPerson($student['spriden_id'], array('address'));
$LabelText = sprintf("%s\n%s\n%s, %s, %s", $student['spriden_last_name'] . ", " . $student['spriden_first_name'] . " " . $student['spriden_mi'], $st->address['CA'][0]->street_line1, $st->address['CA'][0]->city, $st->address['CA'][0]->stat_code, $st->address['CA'][0]->zip);
$this->Avery5160($x, $y, $fpdf, $LabelText);
$y++;
// next row
if ($y == 10) {
// end of page wrap to next column
$x++;
$y = 0;
if ($x == 3) {
// end of page
$x = 0;
$y = 0;
$fpdf->AddPage();
}
}
$st->destroy();
}
echo $fpdf->Output($name, $destination = 'd');
}
示例10: FPDF
<?php
include "../../libraries/tcpdf/font/times.php";
//fpdf
$this->load->library('fpdf');
//fpdf
$nombre = "";
$fpdf = new FPDF();
ob_end_clean();
//inicializa pagina pdf
$fpdf->Open();
$fpdf->AddPage();
$fpdf->SetAuthor("codigoweblibre.comli.co - codigoweblibre.wordpress.com", true);
$fpdf->SetCreator("codigoweblibre.comli.co - codigoweblibre.wordpress.com", true);
//Cabecera
$fpdf->SetFont('Arial', 'B', 12);
$fpdf->SetTextColor("0", "8", "8");
//rojo
//$fpdf->Image(base_url() . 'img/User.png', 10, 10, -100);
$fpdf->SetFontSize(10);
$fpdf->Image('imagenes/banner.png', 8, 10, 192, 22, 'PNG');
$fpdf->Cell(100, 30, ' ', 0, 1, 'C');
$fpdf->Image('imagenes/bandera2.png', 8, 35, 192, 1, 'PNG');
$fpdf->Cell(0, 6, 'UNIDAD EJECUTORA DE TITULACION', 0, 1, 'C');
$fpdf->Cell(0, 6, 'DEL MINISTERIO DE OBRAS PUBLICAS, SERVICIOS Y VIVIENDA', 0, 1, 'C');
$fpdf->SetFont('Arial', 'BU', 10);
$fpdf->Cell(0, 3, '', 0, 1, 'C');
$fpdf->Cell(0, 6, 'REPORTE DE PERSONAL POR FECHA DE MODIFICACION', 0, 1, 'C');
$fpdf->Ln();
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->Cell(45, 7, "Nombre ", 1);
示例11: createPDF
private static function createPDF($text)
{
if (Config::get('pdf_font', false) !== false) {
Config::setRunningConfig('pdf_font', 'Arial');
Config::setRunningConfig('pdf_fontsize', 12);
}
$pdf = new FPDF();
$pdf->SetCreator('PHPlist version ' . PHPLIST_VERSION);
$pdf->Open();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont(Config::get('pdf_font'), Config::get('pdf_fontstyle'), Config::get('pdf_fontsize'));
$pdf->Write((int) Config::get('pdf_fontsize') / 2, $text);
$fname = tempnam(Config::get('tmpdir'), 'pdf');
$pdf->Output($fname, false);
return $fname;
}
示例12: generateFolhaDespachoProcesso
/**
* @return void
* @param string $numero_processo
*/
public function generateFolhaDespachoProcesso($numero_processo)
{
define("FPDF_FONTPATH", "bibliotecas/fpdf/font/");
include "bibliotecas/fpdf/fpdf.php";
$stmt = Controlador::getInstance()->getConnection()->connection->prepare("SELECT PC.NUMERO_PROCESSO, PC.DT_AUTUACAO AS AUTUACAO, TB_PROCESSOS_INTERESSADOS.INTERESSADO,\n TB_PROCESSOS_INTERESSADOS.CNPJ_CPF as CNPJ_CPF, PA.ASSUNTO\n FROM TB_PROCESSOS_CADASTRO PC INNER JOIN TB_PROCESSOS_ASSUNTO PA ON PA.ID = PC.ASSUNTO\n INNER JOIN TB_PROCESSOS_INTERESSADOS ON TB_PROCESSOS_INTERESSADOS.ID = PC.INTERESSADO\n WHERE PC.NUMERO_PROCESSO = ? LIMIT 1");
$stmt->bindParam(1, $numero_processo, PDO::PARAM_STR);
$stmt->execute();
$processo = $stmt->fetch(PDO::FETCH_ASSOC);
if (empty($processo)) {
print 'Processo não encontrado!';
return;
}
$pdf = new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont("Arial", '', 10);
$pdf->Image("imagens/" . __LOGO_JPG__, 95, 8, 20, 20);
$pdf->Ln(2);
$pdf->Cell(185, 8, "Folha de Despachos", 0, 0, 'R');
$pdf->Ln(20);
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->SetFont("Arial", "B", 10);
$pdf->Cell(180, 5, utf8_decode(__CABECALHO_ORGAO__), 0, 0, 'C');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->Cell(180, 5, '', 0, 0, 'R');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(180, 5, utf8_decode("Informações do Processo"), 0, 0, 'C');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(35, 5, utf8_decode("Número do Processo:"), 0, 0, 'L');
$pdf->SetFont("Arial", '', 9);
$pdf->Cell(90, 5, $numero_processo, 0, 0, 'L');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(30, 5, utf8_decode("Data da Autuação:"), 0, 0, 'L');
$pdf->SetFont("Arial", '', 9);
$pdf->Cell(25, 5, Util::formatDate($processo['AUTUACAO']), 0, 0, 'L');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(20, 5, "Interessado:", 0, 0, 'L');
$pdf->SetFont("Arial", '', 9);
$pdf->Cell(160, 5, utf8_decode($processo['INTERESSADO']), 0, 0, 'L');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->Cell(15, 5, "Assunto:", 0, 0, 'L');
$pdf->SetFont("Arial", '', 9);
$pdf->Cell(165, 5, utf8_decode($processo['ASSUNTO']), 0, 0, 'L');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(180, 5, "Despachos", 0, 0, 'C');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->Cell(5, 5, '', 0, 0, 'C');
$pdf->Cell(180, 5, '', 0, 0, 'C');
$pdf->Cell(5, 5, '', 0, 1, 'L');
$pdf->SetFont("Arial", '', 7);
$pdf->Cell(5, 64, "1", 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(5, 64, "2", 1, 1, 'C');
$pdf->SetFont("Arial", '', 7);
$pdf->Cell(5, 64, "3", 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(5, 64, "4", 1, 1, 'C');
$pdf->SetFont("Arial", '', 7);
$pdf->Cell(5, 64, "5", 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(90, 64, '', 1, 0, 'C');
$pdf->Cell(5, 64, "6", 1, 1, 'C');
$pdf->Output("bibliotecas/fpdf", "i");
}
示例13: FPDF
<?php
define('FPDF_FONTPATH', '../font/');
require '../fpdf.php';
$pdf = new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 10, 'Hello World!');
$pdf->Output();
示例14: while
$navs = oci_fetch_row($querynav);
$nav_amount = $navs[1];
//{}{}{}{}{}{}{}{}}{}{}{}{}{}{}{}{}}}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{
$comp = "SELECT COMPANY_NAME, TEL, EMAIL,WEBSITE, ADDRESS,FAX from Company";
$QryCompany = oci_parse($conn, $comp);
oci_execute($QryCompany);
while ($Companydet = oci_fetch_row($QryCompany)) {
$compname = $Companydet[0];
$comptel = $Companydet[1];
$compemail = $Companydet[2];
$compweb = $Companydet[3];
$compadd = $Companydet[4];
$compfax = $Companydet[5];
}
//{}{}{}{}{}{}{}{}}{}{}{}{}{}{}{}{}}}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{
$sql = "SELECT * FROM TRANS WHERE ACCOUNT_NO='{$accno}' AND CONFIRMED IS NOT NULL AND DELETED IS NULL AND REVERSED IS NULL order by trans_id, TRANS_DATE asc";
$querytrans = oci_parse($conn, $sql);
oci_execute($querytrans);
}
$statement = new FPDF();
$statement->Open();
$statement->AddPage('L', 'a4');
$statement->Image('../images/logo.png', 10, 8, 80);
$statement->Ln();
$statement->SetFont('Times', '', 10);
$statement->Cell(170);
$statement->Cell(170, 05, 'P.O Box: ' . $compadd, 'R');
$statement->Ln();
$statement->Cell(170);
$statement->Cell(170, 06, 'Fax : ' . $compfax, 'R');
$statement->Ln();
示例15: facturarform
function facturarform($idFactura)
{
global $db, $hoy, $tmIdUsuario, $facturado;
$pdf = new FPDF();
// Manda datos al FPDF.
$pdf->Open();
$pdf->SetMargins(20, 20, 20);
$pdf->AddPage();
$cont = 0;
$row = 100;
// inicio de renglon para los conceptos.
// Moneda
$moneda = getValueTable("moneda", "FT_TMA", "id_factura", $idFactura);
$idCliente = getValueTable("id_cliente", "FT_TMA", "id_factura", $idFactura);
//actualizar flg_proforma para indicar que ya se puede mandar a imprimir la factura
$sql = "update FT_TMA set flg_proforma='1' where id_factura='{$idFactura}'";
$db->query($sql);
// Datos del cliente
$sql = "select * from FT_CLIENTE where id_cliente='{$idCliente}'";
$db->query($sql);
while ($db->next_record()) {
$cliente = $db->f(cliente);
$tel = $db->f(tel);
$rfc = $db->f(rfc);
$calle = $db->f(calle);
$noExt = $db->f(no_ext);
$noInt = $db->f(no_int);
$colonia = $db->f(colonia);
$cp = $db->f(cp);
$ciudad = $db->f(ciudad);
$edo = $db->f(edo);
}
// Encabezado
$pdf->Image('../images/msc.jpg', 8, 16, 13);
$pdf->Image('../images/rfc2.jpg', 5, 235, 25);
$pdf->Image('../images/mscblackF.jpg', 25, 80, 150);
$pdf->SetFont('Arial', 'B', 15);
//$pdf->Text(65,20,"RECIBASE");
$pdf->SetFont('Arial', 'B', 11);
$pdf->Text(25, 23, "MEDITERRANEAN SHIPPING COMPANY MÉXICO, S.A. DE C.V.");
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text(153, 23, "AS AGENTS ONLY");
$pdf->SetFont('Arial', 'B', 6);
//DIRECCION OFICINA MATRIZ
$pdf->Text(5, 30, "OFICINA MATRIZ");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(2, 32, "AV. BENJAMIN FRANKLIN No 204");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(2, 34, "PISO 1 COL ESCANDON C.P. 11800");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(1, 36, "DELEG. MIGUEL HIDALGO, MEXICO DF");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(9, 38, "TEL50917070");
//DIRECCION OFICINA ALTAMIRA
$pdf->SetFont('Arial', 'B', 6);
$pdf->Text(35, 29, "SUC. ALTAMIRA");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(35, 31, "AV. RIO TMESI KM0+700");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(30, 33, "EDIF. TORRE MULTIMODAL DESP. 306");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(32, 35, "C.P. 69600 PUERTO INDUSTRIAL");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(38, 37, "ALTAMIRA, TAMPS.");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(37, 39, "TEL: 01 833 260-3200");
//DIRECCION OFICINA GUADALAJARA
$pdf->SetFont('Arial', 'B', 6);
$pdf->Text(62, 30, "SUC. GUADALAJARA");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(65, 32, "RUBEN DARIO No 217");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(60, 34, "COL.CIRCUNVALACION VALLARTA");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(62, 36, "C.P. 44680 GUADALAJARA JAL.");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(66, 38, "TEL: 01 33 3630-4460");
//DIRECCION OFICINA MANZANILLO
$pdf->SetFont('Arial', 'B', 6);
$pdf->Text(92, 30, "SUC. MANZANILLO");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(90, 32, "CALLE 20 DE NOVIEMBRE No 11");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(92, 34, "COL.BUROCRATA C.P.28250");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(96, 36, "MANZANILLO, COL.");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(95, 38, "TEL: 01 314 332-3055");
//DIRECCION OFICINA MAZATLAN
$pdf->SetFont('Arial', 'B', 6);
$pdf->Text(122, 29, "SUC. MANZATLAN");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(118, 31, "AV. EMILIO BARRAGAN No 63 DESP. 102");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(123, 33, "EDIF. CENTRO MARITIMO");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(123, 35, "CO. CENTRO C.P. 82000");
$pdf->SetFont('Arial', 'B', 4);
$pdf->Text(125, 37, "MAZATLAN SINALOA");
$pdf->SetFont('Arial', 'B', 4);
//.........这里部分代码省略.........