示例#1
3
 function export_order($id)
 {
     global $FANNIE_OP_DB, $FANNIE_ROOT;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $order = new PurchaseOrderModel($dbc);
     $order->orderID($id);
     $order->load();
     $items = new PurchaseOrderItemsModel($dbc);
     $items->orderID($id);
     $vendor = new VendorsModel($dbc);
     $vendor->vendorID($order->vendorID());
     $vendor->load();
     $contact = new VendorContactModel($dbc);
     $contact->vendorID($order->vendorID());
     $contact->load();
     if (!class_exists('FPDF')) {
         include_once $FANNIE_ROOT . 'src/fpdf/fpdf.php';
     }
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', '12');
     $pdf->Cell(100, 5, 'Vendor: ' . $vendor->vendorName(), 0, 0);
     $pdf->Cell(100, 5, 'Date: ' . date('Y-m-d'), 0, 0);
     $pdf->Ln();
     $pdf->Cell(100, 5, 'Phone: ' . $contact->phone(), 0, 0);
     $pdf->Cell(100, 5, 'Fax: ' . $contact->fax(), 0, 0);
     $pdf->Ln();
     $pdf->Cell(100, 5, 'Email: ' . $contact->email(), 0, 0);
     $pdf->Cell(100, 5, 'Website: ' . $contact->website(), 0, 0);
     $pdf->Ln();
     $pdf->MultiCell(0, 5, "Ordering Info:\n" . $contact->notes(), 'B');
     $pdf->Ln();
     $cur_page = 0;
     $pdf->SetFontSize(10);
     foreach ($items->find() as $obj) {
         if ($cur_page != $pdf->PageNo()) {
             $cur_page = $pdf->PageNo();
             $pdf->Cell(25, 5, 'SKU', 0, 0);
             $pdf->Cell(20, 5, 'Order Qty', 0, 0);
             $pdf->Cell(30, 5, 'Brand', 0, 0);
             $pdf->Cell(65, 5, 'Description', 0, 0);
             $pdf->Cell(20, 5, 'Case Size', 0, 0);
             $pdf->Cell(20, 5, 'Est. Cost', 0, 0);
             $pdf->Ln();
         }
         $pdf->Cell(25, 5, $obj->sku(), 0, 0);
         $pdf->Cell(20, 5, $obj->quantity(), 0, 0, 'C');
         $pdf->Cell(30, 5, $obj->brand(), 0, 0);
         $pdf->Cell(65, 5, $obj->description(), 0, 0);
         $pdf->Cell(20, 5, $obj->caseSize(), 0, 0, 'C');
         $pdf->Cell(20, 5, sprintf('%.2f', $obj->caseSize() * $obj->unitCost() * $obj->quantity()), 0, 0);
         $pdf->Ln();
     }
     $pdf->Output('order_export.pdf', 'D');
 }
示例#2
3
 public function generarFolleto()
 {
     $concursos = $this->concursoMapper->findConcurso("pinchosOurense");
     $establecimientos = $this->establecimientoMapper->findAllValidados();
     $pinchos = $this->pincho->all();
     $pdf = new FPDF();
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 30);
     $pdf->SetTextColor(85, 53, 20);
     $pos_y = 10;
     $pdf->Cell(0, 24, $concursos->getNombre(), 0, 0, "L");
     $pdf->Ln();
     $pdf->SetFont('Arial', '', 16);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->MultiCell(0, 6, $concursos->getDescripcionConcurso(), 0, "L");
     $pdf->SetTextColor(85, 53, 20);
     $pdf->SetFont('Arial', 'B', 13);
     $pdf->Cell(0, 24, "Establecimientos participantes", 0, 0, "L");
     foreach ($establecimientos as $establecimiento) {
         $pdf->Ln();
         $pdf->SetFont('Arial', 'B', 13);
         $pdf->SetTextColor(85, 53, 20);
         $pdf->SetFillColor(182, 145, 107);
         $pdf->Cell(0, 10, utf8_decode($establecimiento->getNombre()), 1, 0, "C", "false");
         $pdf->Ln();
         $pdf->SetFont('Arial', 'I', 13);
         $pdf->SetTextColor(0, 0, 0);
         $pdf->Cell(0, 10, utf8_decode($establecimiento->getDescripcion()), 0, 0, "L");
         $pdf->Ln();
         $pdf->Cell(0, 10, utf8_decode($establecimiento->getLocalizacion()), 0, 0, "L");
         $pdf->Ln();
         $pdf->Cell(0, 10, utf8_decode("Pincho:"), 0, 0, "L");
         foreach ($pinchos as $pincho) {
             if ($pincho->getEstablecimiento() == $establecimiento->getId()) {
                 $pdf->Ln();
                 $pdf->Cell(5);
                 $pdf->Cell(0, 10, utf8_decode($pincho->getNombre()), 0, 0, "L");
                 $pdf->Ln();
                 $pdf->Cell(5);
                 $pdf->Cell(0, 10, utf8_decode($pincho->getDescripcion()), 0, 0, "L");
                 $pdf->Ln();
                 $pdf->Cell(5);
                 if ($pincho->isCeliaco()) {
                     $pdf->Cell(0, 10, utf8_decode("Apto para celiaco"), 0, 0, "L");
                 } else {
                     $pdf->Cell(0, 10, utf8_decode("No apto para celiaco"), 0, 0, "L");
                 }
             }
         }
         $pdf->Ln(5);
     }
     $pdf->Output("folleto.pdf", "D");
 }
示例#3
3
 public function drawPDF()
 {
     $pdf = new \FPDF('L', 'mm', 'Letter');
     $pdf->SetMargins(3.175, 3.175, 3.175);
     $pdf->SetAutoPageBreak(false);
     if (\COREPOS\Fannie\API\FanniePlugin::isEnabled('CoopDealsSigns')) {
         $this->font = 'Gill';
         $this->alt_font = 'GillBook';
         define('FPDF_FONTPATH', dirname(__FILE__) . '/../../../modules/plugins2.0/CoopDealsSigns/noauto/fonts/');
         $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     }
     $pdf->SetFont($this->font, '', 16);
     $data = $this->loadItems();
     $width = 136.52;
     $height = 105;
     $top = 90;
     $left = 15;
     $effective_width = $width - 2 * $left;
     foreach ($data as $item) {
         $pdf->AddPage();
         $column = 1;
         // right aligned
         $price = $this->printablePrice($item);
         $pdf->SetXY($left + $width * $column, $top);
         $pdf->SetFontSize($this->SMALL_FONT);
         $pdf->Cell($effective_width, 10, $item['brand'], 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFontSize($this->MED_FONT);
         $pdf->MultiCell($effective_width, 12, $item['description'], 0, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFontSize($this->BIG_FONT);
         $pdf->Cell($effective_width, 25, $price, 0, 1, 'C');
         $y_pos = $pdf->GetY();
         if ($item['startDate'] != '' && $item['endDate'] != '') {
             // intl would be nice
             $datestr = $this->getDateString($item['startDate'], $item['endDate']);
             $pdf->SetXY($left + $width * $column, $top + ($height - 40));
             $pdf->SetFontSize($this->SMALL_FONT);
             $pdf->Cell($effective_width, 20, $datestr, 0, 1, 'R');
         }
         if ($item['originName'] != '') {
             $pdf->SetXY($left + $width * $column, $y_pos);
             $pdf->SetFontSize($this->SMALL_FONT);
             if (strlen($item['originName']) < 50) {
                 $pdf->Cell($effective_width, 20, $item['originName'], 0, 1, 'L');
             } else {
                 $pdf->Cell($effective_width, 20, $item['originShortName'], 0, 1, 'L');
             }
         }
     }
     $pdf->Output('WfcProdSingle.pdf', 'I');
 }
示例#4
2
    $pdf->Output();
} else {
    $pdf = new FPDF();
    // var_dump(get_class_methods($pdf)); displays all the functions available in fpdf
    $pdf->AddPage();
    $pdf->SetXY(0, 30);
    $pdf->SetFont("Times", "BU", "20");
    //Arguments are font-family, style(B, I, U), Size
    $pdf->Cell(0, 20, "MEDICAL CERTIFICATE", 0, 1, "C");
    //Width, height, string to be displayed, border size, same line or newline(0 or 1),alignment-centre,left, right
    $pdf->SetFont("Times", "", "14");
    $pdf->SetXY(140, 50);
    $dt = date("d/m/Y");
    $pdf->Cell(0, 20, "Signature of the applicant", 0, 1, "L");
    $pdf->SetXY(15, 80);
    $pdf->MultiCell(0, 20, "I ......................................... after careful personal examination of the case do hereby certify that ............................ whose signature is given above is suffering from ..................... and I consider that a period of absence from duty of ........................ with effect from .......................... is absolutely necessary for the restoration of his/her health.", 0);
    $pdf->SetXY(17, 175);
    $pdf->Cell(0, 20, "Place : ", 0, 1, "L");
    $pdf->SetXY(17, 190);
    $pdf->Cell(0, 20, "Date : ", 0, 0, "L");
    $pdf->SetXY(35, 190);
    $pdf->Cell(0, 20, $dt, 0, 1, "L");
    $pdf->SetXY(148, 175);
    $pdf->Cell(0, 20, "Reg. Medical Practitioner", 0, 1, "L");
    $pdf->SetXY(148, 190);
    $pdf->Cell(0, 20, "(Reg No                           )", 0, 1, "L");
    $pdf->Output();
}
?>

<!doctype html>
示例#5
1
// TITRE
$pdf->SetFontSize('14');
$pdf->Cell(0, 0, $product->post_title, '', 0, 'C');
////////////////////
$images = rwmb_meta('PRODUCT_first_image', 'type=image&size=large', $idProduct);
foreach ($images as $image) {
    $pdf->setX(10);
    $pdf->Image($image['url'], 10, $startY + 5, 75, 75);
}
// DESCRIPTION
//////////////////
$product->post_content = str_replace("<strong>", "", $product->post_content);
$product->post_content = str_replace("</strong>", "", $product->post_content);
$pdf->SetXY(90, $startY + 10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode($product->post_content), 0, 1, 'L');
//////////////////
$startXBlockProperties = 90;
$startYBlockProperties = 130;
// LOGO SIZE
///////////////////
$pdf->SetXY($startXBlockProperties, $startYBlockProperties);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(35, 10, "Logo Size :", 0, 1, 'L');
$pdf->SetXY($startXBlockProperties + 30, $startYBlockProperties);
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(50, 10, utf8_decode(rwmb_meta('PRODUCT_logo_size', '', $idProduct)), 0, 1, 'L');
////////////////////
// ITEM SIZE
///////////////////
$pdf->SetXY($startXBlockProperties, $startYBlockProperties + 5);
function EWD_UFAQ_Export_To_PDF()
{
    require_once EWD_UFAQ_CD_PLUGIN_PATH . '/FPDF/fpdf.php';
    if ($Category != "EWD_UFAQ_ALL_CATEGORIES") {
        $category_array = array('taxonomy' => 'ufaq-category', 'field' => 'slug', 'terms' => $Category->slug);
    }
    $params = array('posts_per_page' => -1, 'post_type' => 'ufaq');
    $faqs = get_posts($params);
    $PDFPasses = array("FirstPageRun", "SecondPageRun", "Final");
    foreach ($PDFPasses as $PDFRun) {
        $pdf = new FPDF();
        $pdf->AddPage();
        if ($PDFRun == "SecondPageRun" or $PDFRun == "Final") {
            $pdf->SetFont('Arial', 'B', 14);
            $pdf->Cell(20, 10, "Page #");
            $pdf->Cell(20, 10, "Article Title");
            $pdf->Ln();
            $pdf->SetFont('Arial', '', 12);
            foreach ($ToC as $entry) {
                $pdf->Cell(20, 5, "  " . $entry['page']);
                $pdf->MultiCell(0, 5, $entry['title']);
                $pdf->Ln();
            }
            unset($ToC);
        }
        foreach ($faqs as $faq) {
            $PostTitle = strip_tags(html_entity_decode($faq->post_title));
            $PostText = strip_tags(html_entity_decode($faq->post_content));
            $PostText = str_replace("&#91;", "[", $PostText);
            $PostText = str_replace("&#93;", "]", $PostText);
            $pdf->AddPage();
            $Entry['page'] = $pdf->page;
            $Entry['title'] = $PostTitle;
            $pdf->SetFont('Arial', 'B', 15);
            $pdf->MultiCell(0, 10, $PostTitle);
            $pdf->Ln();
            $pdf->SetFont('Arial', '', 12);
            $pdf->MultiCell(0, 10, $PostText);
            $ToC[] = $Entry;
            unset($Entry);
        }
        if ($PDFRun == "FirstPageRun" or $PDFRun == "SecondPageRun") {
            $pdf->Close();
        }
        if ($PDFRun == "Final") {
            $pdf->Output('Ultimate-FAQ-Manual.pdf', 'D');
        }
    }
}
示例#7
0
 function MultiCell($w, $h, $txt, $border = 0, $align = 'L', $fill = 0)
 {
     if ($this->CurrentFont['type'] == 'Type0') {
         $this->MBMultiCell($w, $h, $txt, $border, $align, $fill);
     } else {
         parent::MultiCell($w, $h, $txt, $border, $align, $fill);
     }
 }
 /**
  * Sets up a new PDF object with the necessary settings
  *
  * @return  FPDF            A new PDF object
  */
 protected function initialize_pdf()
 {
     global $CFG;
     require_once $CFG->libdir . '/fpdf/fpdf.php';
     $newpdf = new FPDF('L', 'in', 'letter');
     $newpdf->setMargins(self::marginx, self::marginy);
     $newpdf->SetFont('Arial', '', 9);
     $newpdf->AddPage();
     $newpdf->SetFont('Arial', '', 16);
     $newpdf->MultiCell(0, 0.2, $this->report->title, 0, 'C');
     $newpdf->Ln(0.2);
     $newpdf->SetFont('Arial', '', 8);
     $newpdf->SetFillColor(225, 225, 225);
     return $newpdf;
 }
示例#9
0
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;
}
示例#10
0
文件: tuto7.php 项目: wycus/darmedic
define('FPDF_FONTPATH', '../font/');
require '../fpdf.php';
$pdf = new FPDF();
$pdf->AddFont('Calligrapher', '', 'arial_ce.php');
$pdf->AddPage();
$pdf->SetFont('Calligrapher', '', 10);
$pdf->MultiCell(0, 10, 'Po¿ar wybuch³ w sk³adzie wojskowym w Uljanowsku, w po³udniowo-wschodniej Rosji. S³ychaæ by³o seriê eksplozji. Nad miastem unosi³ siê s³up czarnego dymu. Teraz, na szczêœcie, sytuacja jest pod kontrol¹. Trwa dogaszanie ognia. W po¿arze zginê³y dwie osoby. 

 
Fot. vulyanovske.ru 
P³on¹ce sk³ady wojskowe w Uljanowsku

 
Fot. vulyanovske.ru 
P³on¹ce sk³ady wojskowe w Uljanowsku
40-stu zaginionych w po¿arze sk³adów wojskowych odnalaz³o siê ¿ywych. Tak¹ informacjê poda³ gubernator Uljanowska Siergiej Kowaliow. - Jestem niesamowicie szczêœliwy, bo myœleliœmy, ¿e ju¿ nie ¿yj¹, a oni uciekli z po¿ogi - doda³ Kowaliow. Wci¹¿ poszukiwanych jest 11 osób. Do tej pory potwierdzono dwie ofiary wybuchów. To stra¿acy, którzy uczestniczyli w akcji gaœniczej. Po¿ar wybuch³ oko³o 13.50 naszego czasu. W licz¹cym 600 tys. mieszkañców mieœcie nad Wo³g¹ s³ychaæ by³o ogromne eksplozje. Dochodzi³y one z kierunku, gdzie znajduje siê jednostka Marynarki Wojennej Federacji Rosyjskiej. Jednostka po³o¿ona jest w dzielnicy Zawo³¿skiej, mieszka tam 100 tys. ludzi. W bliskim s¹siedztwie jednostki s¹ wysokie domy mieszkalne. Z zagro¿onego rejonu ewakuowano 3 tys. osób.

P³on¹ sk³ady wojskowe w Rosji



Nie ma zatrucia wody i atmosfery

Ministerstwo Obrony Rosji potwierdzi³o fakt po¿aru na terenie jednego ze swoich obiektów. Nie poda³o jednak szczegó³ów. Wed³ug wiadomoœci Interfaksu, po¿ar obj¹³ sk³ad konwencjonalnej broni. Informator agencji poda³, ¿e do wybuchu ognia dosz³o najprawdopodobniej podczas utylizacji starych ³adunków. W Uljanowsku zosta³ powo³any sztab operacyjny, który zajmie siê likwidacj¹ nastêpstw po¿aru. Jego dogaszanie mo¿e potrwaæ nawet do rana. Nadal s³ychaæ sporadyczne wybuchy pocisków. Funkcjonariusze regionalnego Ministerstwa do Spraw Nadzwyczajnych poinformowali, ze wybuchy amunicji nie stworzy³y zagro¿enia zatrucia wody i atmosfery.

Internauci: Do zobaczenia w wiadomoœciach

Mieszkañcy Uljanowska pisali o fali uderzeniowej wybuchów, która wybija³a okna w blokach. O po¿arze natychmiast zaczêli siê informowaæ internauci na lokalnych stronach. - S³ychaæ wybuchy, ogromny s³up czarnego dymu i p³omieni. To chyba arsena³ p³onie. - Dzwoni³a do mnie dziewczyna. Wybuchy s³ychaæ bez przerwy i czuæ uderzenia fal uderzeniowych. Ogl¹dajcie nas w g³ównych wiadomoœciach - pisa³ na jednej z lokalnych stron internauta o nicku "doktorhouse".

Alert24: Wyœlij nam newsa, zdjêcia albo wideo! | SMS/MMS 6', 1);
$pdf->Output();
示例#11
0
$pdf->SetX(270);
//$pdf->MultiCell(20,5,$column_code8,1);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(290);
//$pdf->MultiCell(15,5,$column_code9,1);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(305);
//$pdf->MultiCell(20,5,$column_code10,1);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(325);
//$pdf->MultiCell(25,5,$column_code11,1);
$i = 1;
$pdf->SetY($Y_Table_Position);
while ($i < $number_of_rows) {
    $pdf->SetX(5);
    $pdf->MultiCell(345, 5, '', 1);
    $i = $i + 1;
}
$result = mysql_query("select sign1, sign2, sign3, sign4, pos1, pos2, pos3, pos4\r\n\t\t\t\t\tfrom permit_templates") or die(mysql_error());
$resulta = mysql_fetch_row($result);
$Y_Table_Position = $Y_Table_Position + 20;
$pdf->SetY($Y_Table_Position);
$pdf->SetX(5);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(172, 5, 'Inspected By:', 1, 0, 'L');
$pdf->Cell(172, 5, 'Noted By:', 1, 1, 'L');
$pdf->Cell(350, 5, '', 0, 2, 'C');
$pdf->Cell(350, 5, '', 0, 2, 'C');
$pdf->SetFont('Arial', 'BU', 10);
$pdf->SetX(5);
$pdf->Cell(172, 5, $resulta[0], 1, 0, 'C');
示例#12
0
 public function post_id_handler()
 {
     $numbers = array("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty");
     if (!is_array($this->id)) {
         $this->id = array($this->id);
     }
     $today = date("F j, Y");
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     $pdf->AddFont('Gill', 'B', 'GillSansMTPro-Medium.php');
     //Meat of the statement
     foreach ($this->id as $card_no) {
         $pdf->AddPage();
         $pdf->Image('new_letterhead_horizontal.png', 5, 10, 200);
         $pdf->SetFont('Gill', '', '12');
         $pdf->Ln(45);
         $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no);
         $pdf->Cell(10, 10, $today, 0);
         $pdf->Ln(15);
         foreach ($account['customers'] as $c) {
             if ($c['accountHolder']) {
                 $firstname = ucwords(strtolower($c['firstName']));
                 $lastname = ucwords(strtolower($c['lastName']));
                 $fullname = $firstname . " " . $lastname;
                 break;
             }
         }
         //Member address
         $pdf->Cell(10, 10, trim($fullname), 0);
         $pdf->Ln(5);
         $pdf->Cell(80, 10, $account['addressFirstLine'], 0);
         if ($account['addressSecondLine']) {
             $pdf->Cell(80, 10, $account['addressSecondLine'], 0);
         }
         $pdf->Cell(90, 10, $account['city'] . ', ' . $account['state'] . '   ' . $account['zip'], 0);
         $pdf->Ln(15);
         $pdf->MultiCell(0, 5, "Dear " . $firstname . ",");
         $pdf->Ln(5);
         $txt = "We have received your Application to Terminate your membership at WFC. The\nBoard reviews termination requests annually in ";
         $pdf->SetFont("Gill", "", "12");
         $pdf->Write(5, str_replace("\n", " ", $txt));
         $pdf->SetFont("Gill", "B", "12");
         $pdf->Write(5, "February");
         $pdf->SetFont("Gill", "", "12");
         $txt = ". Refunds, less any indebtedness owed to WFC, are authorized for payment in\nthe order received subject to the financial health of WFC and receipt of additional stock\nfrom new members. Your stock will be refunded as soon as possible based on these criteria.";
         $pdf->Write(5, str_replace("\n", " ", $txt) . "\n");
         $pdf->Ln(5);
         $txt = "Submission of an Application to Terminate immediately inactivates your owner\nbenefits and discounts and your right to participate in governance of WFC. Please keep us\nadvised of any changes in your mailing address.";
         $pdf->MultiCell(0, 5, str_replace("\n", ' ', $txt));
         $pdf->Ln(5);
         $txt = "If you have any questions, please do not hesitate to ask. I can be reached at the\nnumber above or at mms@wholefoods.coop. Thank you.";
         $pdf->MultiCell(0, 5, str_replace("\n", ' ', $txt));
         $pdf->Ln(5);
         $pdf->MultiCell(0, 5, "Thank you for your support of WFC");
         $pdf->Ln(10);
         $pdf->MultiCell(0, 5, "Sincerely yours,");
         $pdf->MultiCell(0, 5, "WHOLE FOODS COMMUNITY CO-OP, INC.");
         $pdf->Ln(10);
         $pdf->MultiCell(0, 5, "Amanda Borgren");
         $pdf->MultiCell(0, 5, "Owner Services");
     }
     $pdf->Output('member term letters.pdf', 'D');
     return false;
 }
示例#13
0
$pdf->SetX(120);
$pdf->Cell(35, 10, 'Prix unitaire HT', 1, 0, 'C', 1);
$pdf->SetX(155);
$pdf->Cell(30, 10, 'Montant HT', 1, 0, 'C', 1);
$pdf->Ln(); // retour à la ligne

// détail commande
$positionLigne = 110;
$totalHT = 0;

foreach ($tDetailCommande as $detailCommande) {
	$totalHT += $detailCommande['qteProduit'] * $detailCommande['prixUnitaire'];

	$pdf->SetY($positionLigne);
	$pdf->SetX(20);
	$pdf->MultiCell(80, 10, $detailCommande['descriptionFR'], 1, 'L');
	$pdf->SetY($positionLigne);
	$pdf->SetX(100);
	$pdf->MultiCell(20, 10, $detailCommande['qteProduit'], 1, 'C');
	$pdf->SetY($positionLigne);
	$pdf->SetX(120);
	$pdf->MultiCell(35, 10, $detailCommande['prixUnitaire'], 1, 'C');
	$pdf->SetY($positionLigne);
	$pdf->SetX(155);
	$pdf->MultiCell(30, 10, ($detailCommande['qteProduit'] * $detailCommande['prixUnitaire']), 1, 'C');
	$positionLigne += 10;
}

//  montant total
$pdf->SetY($positionLigne);
$pdf->SetX(155);
示例#14
0
//Fields Name position
$Y_Fields_Name_position = 20;
//Table position, under Fields Name
$Y_Table_Position = 26;
//First create each Field Name
//Gray color filling each Field Name box
$pdf->SetFillColor(232, 232, 232);
//Bold Font for Field Name
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetY($Y_Fields_Name_position);
$pdf->SetX(45);
$pdf->Cell(30, 6, 'StudentID', 1, 0, 'L', 1);
$pdf->SetX(65);
$pdf->Ln();
//Now show the 3 columns
$pdf->SetFont('Arial', '', 12);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(45);
$pdf->MultiCell(30, 6, $column_ID, 1);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(65);
//Create lines (boxes) for each ROW (Product)
//If you don't use the following code, you don't create the lines separating each row
$i = 0;
$pdf->SetY($Y_Table_Position);
while ($i < $number_of_products) {
    $pdf->SetX(45);
    $pdf->MultiCell(120, 6, '', 1);
    $i = $i + 1;
}
$pdf->Output();
示例#15
0
     $pdf->Cell($datew, $sh, $grade['due_date'], 0, 0, 'C', 1);
     $pdf->Cell($assignw, $sh, $grade['assignment_name'], 0, 0, 'L', 1);
     /** if a comment exists use GetStringWidth($s) to figure out how tall
         to make the cells to follow.  Put the comment cell below this one then 
         the others to the right of this one.  Maybe make the comment cell full
         width. **/
     $pdf->Cell($catw, $sh, $grade['category_name'], 0, 0, 'L', 1);
     $pdf->Cell($scorew, $sh, $grade['score'] . "/" . $grade['max_score'], 0, 0, 'C', 1);
     $pdf->Cell($weightw, $sh, $grade['assignment_weight'], 0, 0, 'C', 1);
     $pdf->Cell($avgw, $sh, $grade['avg'], 0, 1, 'C', 1);
     if ($assignInfo['comment'] != '') {
         $pdf->SetFont('Times', 'I', 8);
         $pdf->Cell($datew, $sh, '', 0, 0, 'L', 1);
         $lines = $pdf->GetStringWidth($grade['comment']) / ($pw - $datew);
         $h = $lines * $sh;
         $pdf->MultiCell($pw - $datew, $sh, $grade['comment'], 0, 'L', 1);
         $pdf->SetFont('Times', '', 8);
     }
     /** $x_coord = $pdf->GetX();**/
     $y_coord = $pdf->GetY();
     $rcv++;
 }
 /* determine if custom score chart will fit on current page */
 if ($y_coord + $sh * count($custom_scores) > 10) {
     $pdf->AddPage();
     $pdf->SetTextColor(51, 102, 102);
     $pdf->SetFont('Times', 'B', $titlefs);
     $pdf->SetXY($lm, $tm);
     $pdf->Cell($headingw, $titleh, 'Questar III Student Progress Report (Contd.)', 0, 1, 'C', 0);
     $y_coord = $tm + $titleh;
 }
<?php

include 'config.php';
require '../assets/pdf/fpdf.php';
$pdf = new FPDF("L", "cm", "A4");
$pdf->SetMargins(2, 1, 1);
$pdf->AliasNbPages();
$pdf->AddPage();
$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');
示例#17
0
 //5
 $pdf->Cell(26, 8, 'Tanggal Kembali', 1, 0, 'C', 1);
 $pdf->SetX(156);
 //6
 $pdf->Cell(24, 8, 'Denda', 1, 0, 'C', 1);
 $pdf->SetX(180);
 //7
 $pdf->Cell(25, 8, 'Keterlambatan', 1, 0, 'C', 1);
 $pdf->Ln();
 //Table position, under Fields Name
 $Y_Table_Position = 38;
 //Now show the columns
 $pdf->SetFont('Arial', '', 8);
 $pdf->SetY($Y_Table_Position);
 $pdf->SetX(5);
 $pdf->MultiCell(21, 6, $column_idanggota, 1, 'C');
 //1
 $pdf->SetY($Y_Table_Position);
 $pdf->SetX(26);
 $pdf->MultiCell(43, 6, $column_judul, 1, 'L');
 //2      40
 $pdf->SetY($Y_Table_Position);
 $pdf->SetX(69);
 $pdf->MultiCell(29, 6, $column_tanggalpinjam, 1, 'C');
 //3
 $pdf->SetY($Y_Table_Position);
 $pdf->SetX(98);
 $pdf->MultiCell(32, 6, $column_tanggalharuskembali, 1, 'C');
 //4
 $pdf->SetY($Y_Table_Position);
 $pdf->SetX(130);
示例#18
0
文件: pdf.php 项目: llanosCoder/mybu
     $pdf->Cell(10, 5, "{$cuotas_cuota}", 1, 0, "R");
     $pdf->Cell(23, 5, "{$credito_2_f}", 1, 0, "R");
     $pdf->Cell(10, 5, "{$cuotas_cuota2}", 1, 0, "R");
     $pdf->Cell(22, 5, "{$seguro_f}", 1, 0, "R");
     $pdf->Cell(18, 5, "{$total_descontar}", 1, 0, "R");
     $pdf->Cell(16, 5, "", 1, 0, "R");
     $pdf->SetFont('Arial', '', 7);
     $pdf->Cell(16, 5, "{$tipo_seguro}   {$carga}", 1, 0, "L");
     $pdf->Cell(18, 5, "{$obs}", 1, 1, "R");
     $i++;
 }
 $pdf->AddPage();
 $pdf->SetDrawColor(7, 7, 7);
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetXY(93, 8);
 $pdf->MultiCell(30, 5, "Total Cuota \n Social", 1, 'C');
 $pdf->SetFont('Arial', 'B', 10);
 $pdf->SetXY(60, 25);
 $pdf->Write(1, "Total Empleador");
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetXY(110, 25);
 $pdf->Write(1, number_format($suma, 0, ",", "."));
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetXY(125, 8);
 $pdf->MultiCell(30, 5, "Total Crédito \n Social", 1, 'C');
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetXY(142, 25);
 $pdf->Write(1, number_format($suma1, 0, ",", "."));
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetXY(157, 8);
 $pdf->MultiCell(30, 5, "Total Seguro \n Adicional", 1, 'C');
$pdf->setTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(60, 50, utf8_decode('COMPROBANTE DE RECEPCIÓN DE QUEJA Y/O RECLAMO'));
$pdf->SetXY(20, 52);
$pdf->SetFont('Arial', 'B', 8);
$pdf->setTextColor(255, 255, 255);
$pdf->Cell(50, 6, utf8_decode('FECHA DE PRESENTACIÓN'), 1, 0, 'C', TRUE);
$pdf->Cell(35, 6, '', 1, 0, 'C', FALSE);
$pdf->Cell(50, 6, utf8_decode('HORA DE PRESENTACIÓN'), 1, 0, 'C', TRUE);
$pdf->Cell(35, 6, '', 1, 0, 'C', FALSE);
$pdf->setTextColor(255, 255, 255);
$pdf->Rect(20, 60, 110, 30, 'FD');
$pdf->Rect(20, 90, 110, 30, 'FILL');
$pdf->Rect(20, 120, 110, 30, 'FILL');
$pdf->Rect(130, 60, 60, 90, 'FILL');
$pdf->Text(55, 75, utf8_decode('FUNCIONARIO(A) RECEPTOR'));
$pdf->setTextColor(0, 0, 0);
$pdf->SetFont('Arial', '', 8);
$pdf->Text(23, 105, utf8_decode('APELLIDOS Y NOMBRES:'));
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(70, 148, utf8_decode('FIRMA'));
$pdf->Text(155, 105, utf8_decode('SELLO'));
$pdf->Rect(20, 152, 170, 30, 'FILL');
$pdf->Text(22, 158, utf8_decode('NOTA IMPORTANTE:'));
$pdf->SetXY(22, 160);
$pdf->SetFont('Arial', '', 8);
$pdf->SetRightMargin(20.0);
$pdf->MultiCell(0, 4, utf8_decode('Procesar su denuncia incolucra a varias unidades administrativas adscritas al IVSS y activa procedimientos necesarios para la solución del problema, por lo cual requiere de un lapso de (60) días para su proceso, es por ello que agradecemos esperar a ser contacctado por vía telefónica o cualquier otro medio para informarle del estatus y/o resultado de su Denuncia, Queja y/o Reclamo.'));
/***************************************************************************/
$pdf->Output('comprobante_recepcion_queja.pdf', 'I');
/***************************************************************************/
示例#20
0
    $pdf->Cell($name_len, 10, $title[$i], 1, 0);
    $pdf->Cell($desig_len, 10, $agency[$i], 1, 0);
    $pdf->Cell($doj_len, 10, $value[$i], 1, 0);
    $pdf->Cell($dol_len, 10, $status[$i], 1, 1);
}
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial', 'B');
$head = '19. Courses Handled :';
$pdf->Cell(2 * strlen($head), 10, $head, 0, 0);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial');
$head = 'Undergraduate Level :';
$pdf->Cell(2 * strlen($head), 10, $head, 0, 1);
$pdf->MultiCell(0, 10, $courses_undergrad);
$pdf->Ln();
$pdf->Ln();
$head = 'Postgraduate Level :';
$pdf->Cell(2 * strlen($head), 10, $head, 0, 1);
$pdf->MultiCell(0, 10, $courses_postgrad);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial', 'B');
$head = '20. Short courses / Workshops /Seminars organized :';
$pdf->Cell(2 * strlen($head), 10, $head, 0, 1);
$pdf->SetFont('Arial');
$pdf->MultiCell(0, 10, $wrkshps);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial', 'B');
示例#21
0
<?php 
require 'libs/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 18);
if (!$Transactions) {
    echo '<h3 class="text-center success"><strong>There are no transactions done in this time period.</strong></h3>';
    return 0;
} else {
    //formatting pdf
    $pdf->Image('views/img/ioc.png', 95, 1, 20);
    $pdf->MultiCell(10, 20, "");
    $pdf->Text(35, 28, 'Regular Customer Transactions Monthly Report');
    //table data
    $pdf->SetFont('Arial', 'B', 8);
    date_default_timezone_set('Asia/Colombo');
    //to get srilankan time instead of GMT time
    $date = date("l jS \\of F Y h:i:s A");
    $pdf->Text(5, 5, ' Date: ' . $date);
    $heading = array("Customer", "VehicleNO", "Amount Rs.", "OrderDate", "ReturnedDate");
    $pdf->Cell(20, 20, '', 0, 0, 'C');
    foreach ($heading as $column_heading) {
        $pdf->Cell(30, 20, $column_heading, 1, 0, 'C');
    }
    $pdf->SetMargins(30, 0);
    foreach ($Transactions as $row) {
        $pdf->SetFont('Arial', '', 8);
        $pdf->Ln();
        foreach ($row as $column) {
            $pdf->Cell(30, 10, $column, 1, 0, 'C');
$pdf->SetX(235);
$pdf->Cell(20, 5, '2ND QUARTER', 1, 0, 'C');
$pdf->SetX(255);
$pdf->Cell(15, 5, 'OR NUMBER', 1, 0, 'C');
$pdf->SetX(270);
$pdf->Cell(20, 5, '3RD QUARTER', 1, 0, 'C');
$pdf->SetX(290);
$pdf->Cell(15, 5, 'OR NUMBER', 1, 0, 'C');
$pdf->SetX(305);
$pdf->Cell(20, 5, '4TH QUARTER', 1, 0, 'C');
$pdf->SetX(325);
$pdf->Cell(15, 5, 'OR NUMBER', 1, 0, 'C');
$pdf->SetFont('Arial', '', 6);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(5);
$pdf->MultiCell(35, 5, $column_code1, 1, 0, 'L');
$pdf->SetY($Y_Table_Position);
$pdf->SetX(40);
$pdf->MultiCell(30, 5, $column_code2, 1, 0);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(70);
$pdf->MultiCell(60, 5, $column_code3, 1, 0);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(130);
$pdf->MultiCell(70, 5, $column_code4, 1, 0);
$pdf->SetY($Y_Table_Position);
$pdf->SetX(200);
$pdf->MultiCell(20, 5, $column_code5, 1, 0, 'R');
$pdf->SetY($Y_Table_Position);
$pdf->SetX(220);
$pdf->MultiCell(15, 5, $column_code6, 1, 0, 'R');
$courrier->AddFont('SourceSansPro-Regular', '', 'SourceSansPro-Regular.php');
$courrier->AddFont('SourceSansPro-Semibold', '', 'SourceSansPro-Semibold.php');
$courrier->AddFont('SourceSansPro-LightItalic', '', 'SourceSansPro-LightItalic.php');
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->open();
$courrier->SetAutoPageBreak(1, 15);
$courrier->AddPage();
/* Création bloc emetteur */
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->Image($logo, 5, 10, 45, 27);
$courrier->Ln(20);
$courrier->SetXY(55, 15);
$courrier->Cell(0, 5, $emetteur['nom'], 0, 2, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(55);
$courrier->MultiCell(0, 5, $emetteur['adr'], 0, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(55);
$courrier->MultiCell(0, 5, $emetteur['cp'] . " " . $ville, 0, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->Ln(20);
/* Création bloc destinataire */
$courrier->SetFont('SourceSansPro-Regular', '', 12);
$courrier->SetX(120);
$courrier->Cell(0, 5, $destinataire['nom'], 0, 1, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(120);
$courrier->MultiCell(0, 5, $destinataire['adr'], 0, 'L', false);
//largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
$courrier->SetX(120);
$courrier->Cell(0, 5, $destinataire['cp'], 0, 1, 'L', false);
示例#24
0
$addresslist = $_REQUEST['addresslist'];
$pdf = new FPDF();
$pdf->AddPage();
if (isset($mode) && !empty($mode) && !strcmp($mode, "addresslist")) {
    $addresslist = hex2bin($addresslist);
    $pdf->SetFont('Arial', '', 12);
    include 'config.php';
    $ds = ldap_connect($ldapHost, $ldapPort);
    // must be a valid LDAP server!
    if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
        if ($ds) {
            $r = ldap_bind($ds);
            // this is an "anonymous" bind, typically
            // read-only access
            $pdf->SetFont('Arial', 'B', 12);
            $pdf->MultiCell(80, 6, $ST_ADDRESS_LIST . "\n" . date(DATE_RFC822), 0, 1);
            $pdf->SetFont('Arial', '', 12);
            $pdf->Cell(80, 6, "", 0, 1);
            $tok = strtok($addresslist, "@");
            $counter = 0;
            while ($tok !== false) {
                $ldapFilter = "cn=" . $tok;
                $sr = ldap_search($ds, $ldapDomain, $ldapFilter);
                $info = ldap_get_entries($ds, $sr);
                $text = $info[0]["givenname"][0] . " " . $info[0]["sn"][0] . "\n" . $info[0]["mozillahomestreet"][0] . "\n" . $info[0]["mozillahomepostalcode"][0] . " " . $info[0]["mozillahomelocalityname"][0] . "\n" . $info[0]["mozillahomecountryname"][0];
                $pdf->MultiCell(80, 6, utf8_decode($text), "T", 1);
                $pdf->Cell(80, 6, "", 0, 1);
                $counter = $counter + 1;
                $tok = strtok("@");
            }
        }
示例#25
0
<?php

require 'lib/fpdf/fpdf.php';
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->MultiCell(0, 10, "Liste des livres que vous possédez", 1, "C", 0);
$pdf->Ln();
$pdf->SetFont('Arial', '', 12);
foreach ($livresList as $livre) {
    $pdf->MultiCell(0, 5, utf8_decode($livre->nom() . ' (' . $livre->annee() . ') de ' . $livre->auteurNom() . ' ' . $livre->auteurPrenom()));
    $pdf->Ln();
}
$pdf->Output();
<?php

include 'fpdf153/fpdf.php';
include 'seguridad.php';
include 'seguridad_usu.php';
include 'conectaBD.php';
$correo = $_SESSION["usuario"];
$id = $_REQUEST[id];
$usuario = ejecutaConsulta("Select * from usuario where id='{$id}' and correo='{$correo}';");
$nombre = html_entity_decode(pg_result($usuario, 0, 'nombre'));
$ape1 = html_entity_decode(pg_result($usuario, 0, 'ape1'));
$linea = $nombre . " " . $ape1;
$pdf = new FPDF(L, cm, A4);
$pdf->AddPage();
$pdf->SetFont('Arial', '', 16);
$pdf->Image('img/certifCastellano.jpg', 0, 0, 29.7, 21);
$pdf->MultiCell(27.7, 16, $linea, 0, C);
$pdf->Output('certificado.pdf', I);
示例#27
0
 // ori Y=60
 $pdf->SetFont("Times", "", 10);
 $pdf->Cell(40, 12, "Received From :", "", 0, 'L');
 $pdf->SetFont("Times", "B", 10);
 $pdf->Line($pdf->GetX(), $pdf->GetY() + 9, $pdf->GetX() + 150, $pdf->GetY() + 9);
 $pdf->Cell(0, 12, "{$paidfrom}", "", 0, 'L');
 //Receipt AMT in Text label block (7)
 $pdf->SetXY(10, 38);
 $pdf->SetFont("Times", "", 10);
 $pdf->Cell(40, 12, "The Sum Of :", "", 0, 'L');
 $pdf->SetFont("Times", "", 10);
 $pdf->Line($pdf->GetX(), $pdf->GetY() + 9, $pdf->GetX() + 150, $pdf->GetY() + 9);
 //$pdf->Line($pdf->GetX(),86,$pdf->GetX()+150,86);
 //echo ucwords("SAAAS SDA asDDS");
 $txt_sum = ucwords(strtolower(convertNumber($originalamt)));
 $pdf->MultiCell(0, 10, $currency_code . " " . $txt_sum, "", 'L');
 //Receipt AMT in Text label block (8)
 $pdf->SetXY(10, 45);
 $pdf->SetFont("Times", "", 10);
 $pdf->Cell(40, 10, "Description :", "", 0, 'L');
 $pdf->SetFont("Times", "", 10);
 $pdf->Line($pdf->GetX(), 53, $pdf->GetX() + 150, 53);
 $pdf->Line($pdf->GetX(), 61, $pdf->GetX() + 150, 61);
 $pdf->MultiCell(0, 8, $description, "", 'L');
 //detail table
 $pdf->SetXY(10, 65);
 $pdf->SetFont("Times", "B", 8);
 $pdf->Cell(10, 5, "No", "TB", 0, 'C');
 $pdf->Cell(90, 5, "Item", "TB", 0, 'L');
 $pdf->Cell(40, 5, "Payment Method", "TB", 0, 'C');
 $pdf->Cell(0, 5, "Amount ({$currency_code})", "TB", 1, 'R');
示例#28
0
        //$fac->setXY(55,$tt);
        //$fac->Cell(100,0,$row['DESCRIPCION']);
        //$fac->setXY(113,$tt);
        //$fac->Cell(100,0,$row['SERIES']);
        $fac->setXY(161, $tt);
        $fac->Cell(100, 1, $row['PRECIO']);
        $fac->setXY(184, $tt);
        $fac->Cell(100, 1, $row['PRECIO'] * $row['CANTIDAD']);
        $fac->setXY(55, $tt);
        //calcula los saltos de linea en la descirpcion
        $cc = $row['DESCRIPCION'];
        $cadena = explode(" ", $cc);
        $reg = 1;
        foreach ($cadena as $ind => $valor) {
            if (strlen($cadena[$ind]) >= 84) {
                $reg += 1;
                $subcadena = chunk_split($cadena[$ind], 83, " ");
                str_replace($cadena[$ind], $subcadena, $cc);
                $fac->setXY(55, $tt);
            }
        }
        $fac->MultiCell(100, $reg, $cc);
        //series debajo
        $tt += 4 * $reg;
        $fac->setXY(10, $tt);
        $fac->Cell(0, 1, $row['SERIES_DEBAJO']);
        $tt += 3;
    }
}
$fac->Rect(10, 242, 190, 20);
$fac->Output();
示例#29
-1
文件: index.php 项目: bontiv/intrateb
function index_print()
{
    global $root, $srcdir, $tmpdir;
    include_once $srcdir . DS . 'libs' . DS . 'fpdf.php';
    include_once $srcdir . DS . 'libs' . DS . 'barcode.php';
    if (!isset($_POST['mandate'])) {
        $_POST['mandate'] = 1;
    }
    if (!isset($_POST['subscription'])) {
        $_POST['subscription'] = 1;
    }
    $mdt = new Modele('mandate');
    $mdt->fetch($_POST['mandate']);
    $sub = new Modele('subscription');
    $sub->fetch($_POST['subscription']);
    $usr = new Modele('users');
    $usr->fetch($_SESSION['user']['user_id']);
    $sublist = new Modele('subscription');
    //$sublist->find(array('subscription_mandate' => $mdt->mandate_id));
    $sublist->find();
    if (new DateTime($mdt->mandate_start) > new DateTime() || new DateTime($mdt->mandate_end) < new DateTime()) {
        modexec('syscore', 'moderror');
    }
    ob_start();
    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->SetXY(18, 12);
    $pdf->SetFont('Arial', '', 30);
    $pdf->Cell(180, 10, 'EPITANIME', 0, 0, 'C');
    $pdf->SetFont('Arial', '', 10);
    $pdf->SetXY(18, 21);
    $pdf->Cell(180, 5, 'FEUILLE DE RENSEIGNEMENTS ' . uc($mdt->mandate_label), 0, 0, 'C');
    $pdf->SetXY(18, 26);
    $pdf->Cell(180, 5, 'Veuillez remplir lisiblement en lettres capitales', 0, 0, 'C');
    $pdf->SetFont('Arial', 'B', 10);
    $pdf->SetXY(18, 35);
    $pdf->Cell(180, 5, 'Informations essentielles :', 0, 0, '');
    $pdf->SetXY(18, 40);
    $pdf->Cell(50, 5, 'Pseudo', 1, 0, '');
    $pdf->SetXY(18, 45);
    $pdf->Cell(50, 5, 'Nom', 1, 0, '');
    $pdf->SetXY(18, 50);
    $pdf->Cell(50, 5, uc('Prénom'), 1, 0, '');
    $pdf->SetXY(18, 55);
    $pdf->Cell(50, 5, 'Adresse', 1, 0, '');
    $pdf->SetXY(18, 60);
    $pdf->Cell(50, 5, 'Code postal', 1, 0, '');
    $pdf->SetXY(18, 65);
    $pdf->Cell(50, 5, 'Ville', 1, 0, '');
    $pdf->SetXY(18, 70);
    $pdf->Cell(50, 5, 'Sexe', 1, 0, '');
    $pdf->SetXY(18, 75);
    $pdf->Cell(50, 5, 'Date de naissance', 1, 0, '');
    $pdf->SetXY(18, 80);
    $pdf->Cell(50, 5, uc('Téléphone'), 1, 0, '');
    $pdf->SetXY(18, 85);
    $pdf->Cell(50, 5, 'Courriel', 1, 0, '');
    $pdf->SetXY(18, 95);
    $pdf->Cell(50, 5, uc('Réservé aux étudiants IONIS'), 0, 0, '');
    $pdf->SetXY(18, 100);
    $pdf->Cell(50, 5, 'Login', 1, 0, '');
    $pdf->SetXY(18, 105);
    $pdf->Cell(50, 5, 'Ecole', 1, 0, '');
    $pdf->SetXY(18, 110);
    $pdf->Cell(50, 5, 'Promotion', 1, 0, '');
    $pdf->SetXY(18, 120);
    $pdf->Cell(50, 5, uc('Réservé aux membres prenant l\'inscription FFG (fédération française de GO)'), 0, 0, '');
    $pdf->SetXY(18, 125);
    $pdf->Cell(50, 5, uc('Nationalité'), 1, 0, '');
    $pdf->SetXY(18, 130);
    $pdf->Cell(50, 5, 'Niveau', 1, 0, '');
    $pdf->SetXY(18, 135);
    $pdf->Cell(50, 5, 'Pseudo FFG', 1, 0, '');
    $pdf->SetFont('Arial', '', 12);
    $pdf->SetXY(18, 222);
    $pdf->Cell(160, 5, uc('Reçu par ______________________ le ___/___/20___ , accompagné de la cotisation choisie.'), 0, 0, '');
    $pdf->SetFont('Arial', 'B', 10);
    $pdf->SetXY(38, 230);
    $pdf->Cell(50, 5, 'Signature du membre', 1, 0, '');
    $pdf->Rect(38, 235, 50, 20);
    $pdf->SetXY(130, 230);
    $pdf->Cell(50, 5, uc('Signature du récepteur'), 1, 0, '');
    $pdf->Rect(130, 235, 50, 20);
    $pdf->SetFont('Arial', '', 8);
    $pdf->SetXY(18, 260);
    $pdf->MultiCell(180, 3, uc('Les informations recueillies sont nécessaires pour votre adhésion. Elles font l’objet d’un traitement informatique et sont destinées au secrétariat de l’association. En application de l’article 34 de la loi du 6 janvier 1978, vous bénéficiez d’un droit d’accès et de rectification aux informations qui vous concernent. Si vous souhaitez exercer ce droit et obtenir communication des informations vous concernant, veuillez vous adresser au secrétariat de l’association.'));
    $pdf->SetFont('Arial', '', 10);
    $pdf->SetXY(68, 40);
    $pdf->Cell(130, 5, uc($usr->user_name), 1, 0, '');
    $pdf->SetXY(68, 45);
    $pdf->Cell(130, 5, uc($usr->user_lastname), 1, 0, '');
    $pdf->SetXY(68, 50);
    $pdf->Cell(130, 5, uc($usr->user_firstname), 1, 0, '');
    $pdf->SetXY(68, 55);
    $pdf->Cell(130, 5, uc($usr->user_address), 1, 0, '');
    $pdf->SetXY(68, 60);
    $pdf->Cell(130, 5, uc($usr->user_cp), 1, 0, '');
    $pdf->SetXY(68, 65);
    $pdf->Cell(130, 5, uc($usr->user_town), 1, 0, '');
    $pdf->SetXY(68, 70);
    $pdf->Cell(130, 5, uc($usr->user_sexe), 1, 0, '');
    $pdf->SetXY(68, 75);
    $pdf->Cell(130, 5, uc($usr->user_born), 1, 0, '');
    $pdf->SetXY(68, 80);
    $pdf->Cell(130, 5, uc($usr->user_phone), 1, 0, '');
    $pdf->SetXY(68, 85);
    $pdf->Cell(130, 5, uc($usr->user_email), 1, 0, '');
    $pdf->SetXY(68, 100);
    $pdf->Cell(130, 5, uc($usr->user_login), 1, 0, '');
    $pdf->SetXY(68, 105);
    $pdf->Cell(130, 5, uc($usr->user_type->ut_name), 1, 0, '');
    $pdf->SetXY(68, 110);
    $pdf->Cell(130, 5, uc($usr->user_promo), 1, 0, '');
    $pdf->SetXY(68, 125);
    $pdf->Cell(130, 5, '', 1, 0, '');
    $pdf->SetXY(68, 130);
    $pdf->Cell(130, 5, '', 1, 0, '');
    $pdf->SetXY(68, 135);
    $pdf->Cell(130, 5, '', 1, 0, '');
    $pdf->SetFont('Arial', 'B', 10);
    $pdf->SetXY(18, 145);
    $pdf->Cell(50, 5, uc('Cotisation'), 0, 0, '');
    $cb = '9' . str_pad($mdt->getKey(), 4, '0', STR_PAD_LEFT) . str_pad($usr->getKey(), 7, '0', STR_PAD_LEFT);
    $cbfile = tempnam($tmpdir, 'cb');
    imagebarcode($cbfile, $cb, 200, 40, 2);
    $pdf->Image($cbfile, 10, 10, 30, 0, 'PNG');
    unlink($cbfile);
    $pdf->SetFont('Arial', 'I', 8);
    $pdf->SetXY(185, 10);
    $pdf->Cell(10, 5, $usr->getKey(), 0, 0, 'R');
    $pos = -1;
    $pdf->SetFont('Arial', '', 10);
    while ($c = $sublist->next()) {
        $pos++;
        $x = 25 + $pos % 2 * 90;
        $y = 150 + 5 * floor($pos / 2);
        $pdf->SetXY($x, $y);
        $pdf->Cell(60, 5, uc($c['subscription_label']), 1, 0, '');
        $pdf->Cell(15, 5, number_format($c['subscription_price'], 2, ',', '') . ' ' . chr(128), 1, 0, '');
        $pdf->Rect($x + 75, $y, 5, 5);
        if ($c['subscription_id'] == $sub->subscription_id) {
            $pdf->SetFont('Arial', 'B', 12);
            $pdf->Cell(5, 5, 'X', 0, 0, 'C');
            $pdf->SetFont('Arial', '', 10);
        }
    }
    if (ob_get_flush() == '') {
        $pdf->Output('inscription.pdf', 'I');
    }
    quit();
}
示例#30
-3
 public function post_id_upc_terms_handler()
 {
     $this->id = preg_split('/[^\\d]/', $this->id, 0, PREG_SPLIT_NO_EMPTY);
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->SetMargins(6.35, 6.35, 6.35);
     // quarter-inch margins
     $pdf->SetAutoPageBreak(false);
     $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     $pdf->AddFont('Gill', 'B', 'GillSansMTPro-Heavy.php');
     $margins = $pdf->GetMargins();
     $margins['top'] = 0.0;
     $check_left_x = $margins['left'] > 3.175 ? $margins['right'] : 3.175 - $margins['left'];
     $real_check_top_y = 183.675 - $margins['top'];
     $check_right_x = 203.2 - $margins['left'];
     $real_check_bottom_y = 255.112 - $margins['top'];
     $line_height = 5;
     $envelope_window_tab = 15;
     $right_col1 = 130;
     $right_col2 = 170;
     $my_address = array('610 E 4th St', 'Duluth, MN 55805', 'Tel: 218.728.0884', 'www.wholefoods.coop');
     $check_date = date('F j, Y');
     $dbc = $this->connection;
     $dbc->setDefaultDB($this->config->get('OP_DB'));
     $signage = new COREPOS\Fannie\API\item\FannieSignage(array());
     foreach ($this->id as $card_no) {
         $pdf->AddPage();
         $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no);
         $primary = array();
         foreach ($account['customers'] as $c) {
             if ($c['accountHolder']) {
                 $primary = $c;
                 break;
             }
         }
         $check_number = rand(100000, 999995);
         for ($i = 0; $i < 3; $i++) {
             $pdf->SetFont('Gill', '', 10);
             $check_top_y = $real_check_top_y - $i * 90;
             $check_bottom_y = $real_check_bottom_y - $i * 90;
             $pdf->SetXY($check_left_x, $check_top_y);
             $pdf->Ln($line_height * 4.25);
             foreach ($my_address as $line) {
                 $pdf->SetX($check_left_x + $envelope_window_tab + 20);
                 if ($line == 'www.wholefoods.coop') {
                     $pdf->SetFont('Gill', 'B', 9);
                 }
                 $pdf->Cell(0, $line_height, $line, 0, 1);
             }
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y);
             $pdf->Cell(30, $line_height, 'Check Number:', 0, 0, 'R');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->SetX($check_left_x + $right_col2);
             $pdf->Cell(30, $line_height, $check_number, 0, 0, 'R');
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 1.5 * $line_height);
             $pdf->Cell(30, $line_height, 'Date:', 0, 0, 'R');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->SetX($check_left_x + $right_col2);
             $pdf->Cell(30, $line_height, $check_date, 0, 0, 'R');
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 3 * $line_height);
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->Cell(30, $line_height, 'Amount:', 0, 0, 'R');
             $pdf->SetXY($check_left_x + $right_col1 + 30, $check_top_y + 3 * $line_height);
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->MultiCell(40, $line_height, str_repeat(' ', 2) . $this->terms, 0, 'R');
             $pdf->SetTextColor(0, 0, 0);
             $their_address = array($primary['firstName'] . ' ' . $primary['lastName']);
             $their_address[] = $account['addressFirstLine'];
             if ($account['addressSecondLine']) {
                 $their_address[] = $account['addressSecondLine'];
             }
             $their_address[] = $account['city'] . ', ' . $account['state'] . ' ' . $account['zip'];
             $pdf->SetXY($check_left_x + $envelope_window_tab, $check_top_y + 11 * $line_height);
             $pdf->SetFont('Gill', 'B', 10);
             foreach ($their_address as $line) {
                 $pdf->SetX($check_left_x + $envelope_window_tab);
                 $pdf->Cell(0, $line_height, $line, 0, 1);
             }
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetXY($check_left_x, $check_bottom_y + $line_height - 1);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->Cell(0, $line_height, 'Redeemable only at Whole Foods Co-op', 0, 0, 'C');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetXY($check_left_x + 145, $check_top_y + 6 * $line_height + 1);
             $pdf->SetFont('Gill', '', 8);
             $pdf->MultiCell(50, $line_height - 2, 'Limit one per day. Cannot be applied to previous purchases. No cash value.');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetFillColor(0xcc, 0xcc, 0xcc);
             $pdf->Rect($check_left_x + 84, $check_top_y + 28, 39, 15, 'F');
             $pdf->SetFillColor(0, 0, 0);
             $signage->drawBarcode(ltrim($this->upc, '0'), $pdf, $check_left_x + 87, $check_top_y + 30, array('height' => 11, 'fontsize' => 0));
             $pdf->Image('logo.rgb.noalpha.png', $check_left_x + $envelope_window_tab, $check_top_y + 20, 20);
             $pdf->SetFont('Gill', 'B', '31');
             $pdf->SetXY($check_left_x + $envelope_window_tab, $check_top_y + 0.5 * $line_height);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->Cell(0, 3 * $line_height, 'We Appreciate You!');
             $pdf->SetFont('Gill', '', '10');
             $pdf->SetTextColor(0, 0, 0);
             $pdf->Image(dirname(__FILE__) . '/../GiveUsMoneyPlugin/img/sig.png', $check_right_x - 63.5, $check_top_y + 9 * $line_height, 63.5);
             $pdf->SetXY($check_right_x - 63.5, $check_top_y + 12 * $line_height);
             $pdf->Cell(63.5, $line_height, 'Authorized By Signature', 'T');
             $check_number++;
         }
     }
     $pdf->Output();
 }