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


PHP Cezpdf::setFontFamily方法代码示例

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


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

示例1: Cezpdf

<?php

header('Content-Type: application/json');
error_reporting(0);
require_once 'conexion.php';
require_once '../plugins/ezpdf/Cezpdf.php';
conectarse();
$pdf = new Cezpdf('a4');
$tmp = array('b' => 'Helvetica-Bold', 'i' => 'Courier-Oblique', 'bi' => 'Helvetica-BoldOblique', 'ib' => 'Helvetica-BoldOblique', 'bb' => 'Times-Roman');
$pdf->setFontFamily('Helvetica', $tmp);
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetCmMargins(1.5, 1, 2, 3);
$pdf->addJpegFromFile("../img/o.jpg", 50, 750, 100);
$folio = trim($_GET['folio']);
$result = mysql_query("select folio,fecha,c.nombre_contacto,total,\n\tconcat(nombre,' ',e.apellido_paterno,' ',e.apellido_materno) as nombre \n\tfrom ventas v inner join clientes c on c.matricula = v.cliente \n\tinner join empleados e on e.matricula = v.empleado \n\twhere v.status = 'PAGADA' and folio = '" . $folio . "' ");
while ($datatmp = mysql_fetch_array($result)) {
    $datos = $datatmp['nombre_contacto'];
    $total = $datatmp['total'];
    $emp = $datatmp['nombre'];
    $data[] = array_merge($datatmp, array('folio'));
}
$options = array('shadeHeadingCol' => array(0.6, 0.6, 0.5), 'shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'right', 'width' => 70, 'fontSize' => 8, 'xPos' => 480);
$titlef = array('folio' => '<b>Folio</b>');
$titles = array('fecha' => '<b>Fecha</b>');
$titlet = array('total' => '<b>Total</b>');
$pdf->ezText("\n", 10);
$pdf->ezTable($data, $titlef, '', $options);
$pdf->ezText("\n", 10);
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezText("\n", 10);
$pdf->addText(50, 700, 12, "<b>Atendio: </b>\n");
开发者ID:blacks15,项目名称:proyecto-restaurant,代码行数:31,代码来源:rptventa.php

示例2: init_pdf

function init_pdf($pagesize, $orientation, $title)
{
    global $layout;
    $diff = array(177 => 'aogonek', 161 => 'Aogonek', 230 => 'cacute', 198 => 'Cacute', 234 => 'eogonek', 202 => 'Eogonek', 241 => 'nacute', 209 => 'Nacute', 179 => 'lslash', 163 => 'Lslash', 182 => 'sacute', 166 => 'Sacute', 188 => 'zacute', 172 => 'Zacute', 191 => 'zdot', 175 => 'Zdot', 185 => 'scaron', 169 => 'Scaron', 232 => 'ccaron', 200 => 'Ccaron', 236 => 'edot', 204 => 'Edot', 231 => 'iogonek', 199 => 'Iogonek', 249 => 'uogonek', 217 => 'Uogonek', 254 => 'umacron', 222 => 'Umacron', 190 => 'zcaron', 174 => 'Zcaron');
    $pdf = new Cezpdf($pagesize, $orientation);
    //landscape/portrait
    $pdf->isUnicode = true;
    $pdf->addInfo('Producer', 'LMS Developers');
    $pdf->addInfo('Title', $title);
    $pdf->addInfo('Creator', 'LMS ' . $layout['lmsv']);
    $pdf->setPreferences('FitWindow', '1');
    $pdf->ezSetMargins(PDF_MARGIN_TOP, PDF_MARGIN_BOTTOM, PDF_MARGIN_LEFT, PDF_MARGIN_RIGHT);
    $pdf->setLineStyle(0.5);
    $pdf->setFontFamily('arial', array('b' => 'arialbd'));
    $pdf->selectFont('arial', array('encoding' => 'WinAnsiEncoding', 'differences' => $diff), 1, true);
    return $pdf;
}
开发者ID:kornelek,项目名称:lms,代码行数:17,代码来源:ezpdf.php

示例3: define

 define('PRODUCT_TABLE_LEFT_MARGIN', '2');
 // Height of the product listing rectangles
 define('PRODUCT_TABLE_ROW_HEIGHT', '11');
 // The column sizes are where the product listing columns start on the
 // PDF page, if you make the TABLE HEADER FONT SIZE any larger you will
 // need to tweak these values to prevent text from clashing together
 define('PRODUCTS_COLUMN_SIZE', '450');
 define('PRODUCT_LISTING_BKGD_COLOR', GREY);
 define('MODEL_COLUMN_SIZE', '37');
 define('PRICING_COLUMN_SIZES', '67');
 $vilains = array("&#224;", "&#225;", "&#226;", "&#227;", "&#228;", "&#229;", "&#230;", "&#231;", "&#232;", "&#233;", "&#234;", "&#235;", "&#236;", "&#237;", "&#238;", "&#239;", "&#240;", "&#241;", "&#242;", "&#243;", "&#244;", "&#245;", "&#246;", "&#247;", "&#248;", "&#249;", "&#250;", "&#251;", "&#252;", "&#253;", "&#254;", "&#255;", "&#223;", "&#39;", "&nbsp;", "&agrave;", "&aacute;", "&atilde;", "&auml;", "&Arond;", "&egrave;", "&aelig;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&Iacute;", "&icirc;", "&iuml;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&ntilde;", "&ccedil;", "&yacute;", "&lt;", "&gt;", "&amp;");
 $cools = array('à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'ß', '\'', ' ', 'à', 'á', 'ã', 'ä', 'å', 'è', 'æ', 'ê', 'ë', 'ì', 'í', 'î', 'Î', 'ï', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ñ', 'ç', 'ý', '<', '>', '&');
 $currencies = new currencies();
 //$pdf->setPreferences(array("HideToolbar" => 'false', "HideWindowUI" => 'false'));
 $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
 $y -= 10;
 // logo image  set to right of the above .. change first number to move sideways
 //$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
 // extra info boxs to be used by staff
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(0.5);
 $pdf->Rectangle(300, 745, 250, 70);
 $pdf->addText(310, 785, GENERAL_FONT_SIZE, TEXT_PACKED_BY);
 $pdf->addText(310, 760, GENERAL_FONT_SIZE, TEXT_VERIFIED_BY);
 // line between header order number and order date
 $pdf->setLineStyle(0.5);
 $pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:Packing-Slip.php

示例4: Cezpdf

        $startRecord = 1 + $a * $recordsPerPage;
        if ($numRecords > $startRecord + $recordsPerPage) {
            $endRecord = $startRecord + $recordsPerPage - 1;
        } else {
            $endRecord = $numRecords - 1;
        }
        print "<li><a href=\"create_badge.php?USERS_PK[]=all&numRecords={$numRecords}&pageNumber={$a}\">PDF file for records {$startRecord}-{$endRecord}</a></li>";
    }
    print "</ul>";
    print "</div>";
} else {
    // this is the closest predefined page size matching the labels
    $pdf = new Cezpdf('LETTER', 'portrait');
    $pdf->ezSetMargins($top_margin, $bottom_margin, $left_margin, $right_margin);
    $pdf->selectFont('../../accounts/include/fonts/Helvetica.afm');
    $pdf->setFontFamily('b');
    $pdf->addInfo("Creator", "Sakai Conference Badge Generator");
    $pdf->addInfo("Author", "Educational Technologies at Virginia Tech");
    $pdf->addInfo("Title", "Sakai Conference Badges");
    $pdf->addInfo("CreationDate", localtime());
    $pageCount = 0;
    $offsetRow = 2;
    foreach ($people as $person) {
        if ($pageCount > 0 && $offsetRow == 2) {
            $pdf->ezNewPage();
        }
        for ($columnOffset = 0; $columnOffset <= 1; $columnOffset++) {
            $left_edge = $left_margin + $badge_width * $columnOffset + $margin;
            $right_edge = $left_edge + $badge_width - $margin * 2;
            $top_edge = $top_margin + ($offsetRow + 1) * $badge_height - $margin;
            $bottom_edge = $top_edge - $badge_height + $margin * 2;
开发者ID:azeckoski,项目名称:az-php-sandbox,代码行数:31,代码来源:create_badge.php


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