本文整理汇总了PHP中Cezpdf::selectFont方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::selectFont方法的具体用法?PHP Cezpdf::selectFont怎么用?PHP Cezpdf::selectFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::selectFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Cezpdf
<?php
require_once 'class.ezpdf.php';
$pdf = new Cezpdf('a4', 'landscape');
$pdf->selectFont('../fonts/courier.afm');
$pdf->ezSetCmMargins(1, 1, 1.5, 1.5);
$conexion = mysql_connect("localhost", "admin_root", "OW5wP1dnKC");
mysql_select_db("admin_BD_detenidos", $conexion);
$queEmp = "SELECT * FROM vehiculos WHERE id_v='{$_GET['idreg']}'";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
$ixx = 0;
while ($datatmp = mysql_fetch_assoc($resEmp)) {
if ($ixx == 0) {
}
$ixx = $ixx + 1;
$pdf->ezImage("img/logo.png", 0, 0, 'none', 'left');
$data[] = array_merge($datatmp, array('num' => $ixx));
}
$titles = array('num' => '<b>Num</b>', 'REGISTRO' => '<b>Registro</b>', 'REALIZO' => '<b>Fecha</b>', 'FECHA' => '<b>Realizo</b>', 'DESCRIPCION' => '<b>Descripción</b>', 'COMENTARIOS' => '<b>Comentarios</b>');
$options = array('shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'center', 'width' => 750);
$pdf->ezText($txttit, 10);
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezStream();
示例2: upload_file_to_client_pdf
function upload_file_to_client_pdf($file_to_send)
{
//Function reads a text file and converts to pdf.
global $STMT_TEMP_FILE_PDF;
$pdf = new Cezpdf('LETTER');
//pdf creation starts
$pdf->ezSetMargins(36, 0, 36, 0);
$pdf->selectFont($GLOBALS['fileroot'] . "/library/fonts/Courier.afm");
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
$countline = 1;
$file = fopen($file_to_send, "r");
//this file contains the text to be converted to pdf.
while (!feof($file)) {
$OneLine = fgets($file);
//one line is read
if (stristr($OneLine, "\f") == true && !feof($file)) {
$pdf->ezNewPage();
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
str_replace("\f", "", $OneLine);
}
if (stristr($OneLine, 'REMIT TO') == true || stristr($OneLine, 'Visit Date') == true) {
//lines are made bold when 'REMIT TO' or 'Visit Date' is there.
$pdf->ezText('<b>' . $OneLine . '</b>', 12, array('justification' => 'left', 'leading' => 6));
} else {
$pdf->ezText($OneLine, 12, array('justification' => 'left', 'leading' => 6));
}
$countline++;
}
$fh = @fopen($STMT_TEMP_FILE_PDF, 'w');
//stored to a pdf file
if ($fh) {
fwrite($fh, $pdf->ezOutput());
fclose($fh);
}
header("Pragma: public");
//this section outputs the pdf file to browser
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Length: " . filesize($STMT_TEMP_FILE_PDF));
header("Content-Disposition: attachment; filename=" . basename($STMT_TEMP_FILE_PDF));
header("Content-Description: File Transfer");
readfile($STMT_TEMP_FILE_PDF);
// flush the content to the browser. If you don't do this, the text from the subsequent
// output from this script will be in the file instead of sent to the browser.
flush();
exit;
//added to exit from process properly in order to stop bad html code -ehrlive
// sleep one second to ensure there's no follow-on.
sleep(1);
}
示例3: __construct
public function __construct($paper = 'a4', $orientation = 'portrait', $font = 'Helvetica')
{
if (!file_exists('tmp/' . FS_TMP_NAME . 'pdf')) {
mkdir('tmp/' . FS_TMP_NAME . 'pdf');
}
$this->pdf = new Cezpdf($paper, $orientation);
$this->pdf->selectFont("plugins/facturacion_base/extras/ezpdf/fonts/" . $font . ".afm");
}
示例4: printPDF
function printPDF($res, $res2, $data)
{
$pdf = new Cezpdf("LETTER");
$pdf->ezSetMargins(72, 30, 50, 30);
$pdf->selectFont('Helvetica');
$opts = array('justification' => "center");
$pdf->ezText($res['facility_address'], "", $opts);
$pdf->ezText("\n" . $res2['patient_name'] . "\n" . xl('Date of Birth') . ": " . $res2['patient_DOB'] . "\n" . $res2['patient_address']);
$pdf->ezText("\n");
$opts = array('maxWidth' => 550, 'fontSize' => 8);
$pdf->ezTable($data, "", $title, $opts);
$pdf->ezText("\n\n\n\n" . xl('Signature') . ":________________________________", "", array('justification' => 'right'));
$pdf->ezStream();
}
示例5: printPDF
function printPDF($res, $res2, $data)
{
require_once $GLOBALS['fileroot'] . "/library/classes/class.ezpdf.php";
$pdf = new Cezpdf("LETTER");
$pdf->ezSetMargins(72, 30, 50, 30);
$pdf->selectFont($GLOBALS['fileroot'] . "/library/fonts/Helvetica.afm");
$opts = array('justification' => "center");
$pdf->ezText($res['facility_address'], "", $opts);
$pdf->ezText("\n" . $res2['patient_name'] . "\n" . xl('Date of Birth') . ": " . $res2['patient_DOB'] . "\n" . $res2['patient_address']);
$pdf->ezText("\n");
$opts = array('maxWidth' => 550, 'fontSize' => 8);
$pdf->ezTable($data, "", $title, $opts);
$pdf->ezText("\n\n\n\n" . xl('Signature') . ":________________________________", "", array('justification' => 'right'));
$pdf->ezStream();
}
示例6: Cezpdf
function generar_pdf()
{
require_once toba_dir() . '/php/3ros/ezpdf/class.ezpdf.php';
$pdf = new Cezpdf();
$pdf->selectFont(toba_dir() . '/php/3ros/ezpdf/fonts/Helvetica.afm');
$pdf->ezText('Ejemplo Firma Digital. Tiene dos attachments XML', 14);
//-- Cuadro con datos
$opciones = array('splitRows' => 0, 'rowGap' => 1, 'showHeadings' => true, 'titleFontSize' => 9, 'fontSize' => 10, 'shadeCol' => array(0.9, 0.9, 0.9), 'outerLineThickness' => 0.7, 'innerLineThickness' => 0.7, 'xOrientation' => 'center', 'width' => 500);
$this->s__datos_juegos = toba::db()->consultar("SELECT * from ref_juegos");
$pdf->ezTable($this->s__datos_juegos, '', 'Juegos', $opciones);
$this->s__datos_deportes = toba::db()->consultar("SELECT * from ref_deportes");
$pdf->ezTable($this->s__datos_deportes, '', 'Deportes', $opciones);
$tmp = $pdf->ezOutput(0);
$this->s__pdf = array();
$sesion = get_firmador()->generar_sesion();
$this->s__pdf['path'] = toba::proyecto()->get_path_temp() . "/doc{$sesion}_sinfirma.pdf";
if (!file_put_contents($this->s__pdf['path'], $tmp)) {
throw new toba_error("Imposible escribir en '{$this->s__pdf['path']}'. Chequee permisos");
}
}
示例7: formular
$form = new formular();
$form->fieldset("Monatsbericht", 'monatsbericht');
$b->monatsbericht_mit_ausgezogenen();
$form->fieldset_ende();
break;
case "test":
ob_clean();
// ausgabepuffer leeren
//include_once ('pdfclass/class.ezpdf.php');
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 2.5, 2.5, 2.5);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/hv_logo198_80.jpg', 450, 780, 100, 42);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(42, 743, 6, "BERLUS HAUSVERWALTUNG - Fontanestr. 1 - 14193 Berlin");
$pdf->line(42, 750, 550, 750);
$seite = $pdf->ezGetCurrentPageNumber();
$alle_seiten = $pdf->ezPageCount;
$data55 = array(array('num' => 1, 'name' => 'gandalf', 'type' => 'wizard'), array('num' => 2, 'name' => 'bilbo', 'type' => 'hobbit', 'url' => 'http://www.ros.co.
nz/pdf/'), array('num' => 3, 'name' => 'frodo', 'type' => 'hobbit'), array('num' => 4, 'name' => 'saruman', 'type' => 'bad
dude', 'url' => 'http://sourceforge.net/projects/pdf-php'), array('num' => 5, 'name' => 'sauron', 'type' => 'really bad dude'));
$pdf->ezTable($data55);
// header('Content-type: application/pdf');
// header('Content-Disposition: attachment; filename="downloaded.pdf"');
// $output = $pdf->Output();
// $len = strlen($output);
// header("Content-type: application/pdf"); // wird von MSIE ignoriert
// header("content-length: $len");
// header("Content-Disposition: inline; filename=test.pdf"); //im fenster
示例8: Cezpdf
date_default_timezone_set('UTC');
include 'Cezpdf.php';
$pdf = new Cezpdf('a4', 'portrait');
// to test on windows xampp
if (strpos(PHP_OS, 'WIN') !== false) {
$pdf->tempPath = 'C:/temp';
}
if (!isset($_GET['nocrypt'])) {
// define the encryption mode (either RC4 40bit or RC4 128bit)
$user = isset($_GET['user']) ? $_GET['user'] : '';
$owner = isset($_GET['owner']) ? $_GET['owner'] : '';
$mode = isset($_GET['mode']) && is_numeric($_GET['mode']) ? $_GET['mode'] : 1;
$pdf->setEncryption($user, $owner, array(), $mode);
}
// select a font
$pdf->selectFont('Times-Roman');
$pdf->openHere('Fit');
$pdf->ezText("This example shows how to crypt the PDF document\n");
$pdf->ezText("\nUse \"?mode=1\" for RC4 40bit encryption\n");
$pdf->ezText("\nUse \"?mode=2\" for RC4 128bit encryption\n");
$pdf->ezText("\nUse \"?nocrypt\" to disable the encryption\n");
$pdf->ezText("\nUse \"?user=password\" to set a user password\n");
$pdf->ezText("\nUse \"?owner=password\" to set a owner password\n");
if (isset($_GET['nocrypt'])) {
$pdf->ezText("<b>Not encrypt</b> - nocrypt parameter found");
}
if (isset($_GET['d']) && $_GET['d']) {
echo $pdf->ezOutput(TRUE);
} else {
if ($mode > 1) {
$encMode = "128BIT";
示例9: printPDF
function printPDF($p_params)
{
$pbConfig = new PluginBarcodeConfig();
// create barcodes
$ext = 'png';
$type = $p_params['type'];
$size = $p_params['size'];
$orientation = $p_params['orientation'];
$codes = array();
if ($type == 'QRcode') {
$codes = $p_params['codes'];
} else {
if (isset($p_params['code'])) {
if (isset($p_params['nb']) and $p_params['nb'] > 1) {
$this->create($p_params['code'], $type, $ext);
for ($i = 1; $i <= $p_params['nb']; $i++) {
$codes[] = $p_params['code'];
}
} else {
if (!$this->create($p_params['code'], $type, $ext)) {
Session::addMessageAfterRedirect(__('The generation of some bacodes produced errors.', 'barcode'));
}
$codes[] = $p_params['code'];
}
} elseif (isset($p_params['codes'])) {
$codes = $p_params['codes'];
foreach ($codes as $code) {
if ($code != '') {
$this->create($code, $type, $ext);
}
}
} else {
// TODO : erreur ?
// print_r($p_params);
return 0;
}
}
// create pdf
// x is horizontal axis and y is vertical
// x=0 and y=0 in bottom left hand corner
$config = $pbConfig->getConfigType($type);
require_once GLPI_ROOT . "/plugins/barcode/lib/ezpdf/class.ezpdf.php";
$pdf = new Cezpdf($size, $orientation);
$pdf->selectFont(GLPI_ROOT . "/plugins/barcode/lib/ezpdf/fonts/Helvetica.afm");
$pdf->ezStartPageNumbers($pdf->ez['pageWidth'] - 30, 10, 10, 'left', '{PAGENUM} / {TOTALPAGENUM}') . ($width = $config['maxCodeWidth']);
$height = $config['maxCodeHeight'];
$marginH = $config['marginHorizontal'];
$marginV = $config['marginVertical'];
$heightimage = $height;
if (file_exists(GLPI_PLUGIN_DOC_DIR . '/barcode/logo.png')) {
// Add logo to barcode
$heightLogomax = 20;
$imgSize = getimagesize(GLPI_PLUGIN_DOC_DIR . '/barcode/logo.png');
$logoWidth = $imgSize[0];
$logoHeight = $imgSize[1];
if ($logoHeight > $heightLogomax) {
$ratio = 100 * $heightLogomax / $logoHeight;
$logoHeight = $heightLogomax;
$logoWidth = $logoWidth * ($ratio / 100);
}
if ($logoWidth > $width) {
$ratio = 100 * $width / $logoWidth;
$logoWidth = $width;
$logoHeight = $logoHeight * ($ratio / 100);
}
$heightyposText = $height - $logoHeight;
$heightimage = $heightyposText;
}
$first = true;
foreach ($codes as $code) {
if ($first) {
$x = $pdf->ez['leftMargin'];
$y = $pdf->ez['pageHeight'] - $pdf->ez['topMargin'] - $height;
$first = false;
} else {
if ($x + $width + $marginH > $pdf->ez['pageWidth']) {
// new line
$x = $pdf->ez['leftMargin'];
if ($y - $height - $marginV < $pdf->ez['bottomMargin']) {
// new page
$pdf->ezNewPage();
$y = $pdf->ez['pageHeight'] - $pdf->ez['topMargin'] - $height;
} else {
$y -= $height + $marginV;
}
}
}
if ($code != '') {
if ($type == 'QRcode') {
$imgFile = $code;
} else {
$imgFile = $this->docsPath . $code . '_' . $type . '.' . $ext;
}
if (file_exists($imgFile)) {
$imgSize = getimagesize($imgFile);
$imgWidth = $imgSize[0];
$imgHeight = $imgSize[1];
if ($imgWidth > $width) {
$ratio = 100 * $width / $imgWidth;
$imgWidth = $width;
//.........这里部分代码省略.........
示例10: date
// Tampil Jadwal
default:
$thn_skrg = date("Y");
echo "<h2>Cari Jadwal Kuliah</h2>\n<form method=POST action='modul/mod_jadwal/cetakjadwal.php'>\n<table>\n<tr>\n\t<td>Tahun Ajaran</td>\n\t<td> : <select name=tahun>";
for ($ta = 2009; $ta <= $thn_skrg; $ta++) {
$ts = $ta + 1;
echo "<option value={$ta} selected>{$ta}/{$ts}</option>";
}
echo "</select>\n\t</td>\n</tr>\n<tr>\n<td colspan=2><input type=submit value='Tampilkan Jadwal'></td>\n</tr>\n</table>\n</form>";
break;
case "cetakdatakrs":
include 'modul/mod_cetakkrs/class.ezpdf.php';
$pdf = new Cezpdf();
// Set margin dan font
$pdf->ezSetCmMargins(3, 3, 3, 3);
$pdf->selectFont('modul/mod_cetakkrs/fonts/Courier.afm');
$all = $pdf->openObject();
// Tampilkan logo
//$pdf->setStrokeColor(0, 0, 0, 1);
//$pdf->addJpegFromFile('logo.jpg',20,800,69);
// Teks di tengah atas untuk judul header
$pdf->addText(200, 820, 16, '<b>KARTU RENCANA STUDI</b>');
$pdf->addText(200, 800, 14, '<b>UNIVERSITAS ISLAM NEGERI SUNAN GUNUNG DJATI BANDUNG</b>');
// Garis atas untuk header
$pdf->line(10, 795, 578, 795);
// Garis bawah untuk footer
$pdf->line(10, 50, 578, 50);
// Teks kiri bawah
$pdf->addText(30, 34, 8, 'Dicetak tgl:' . date('d-m-Y, H:i:s'));
$pdf->closeObject();
// Tampilkan object di semua halaman
示例11: imprimirEstadoCuentaCliente
/**
* Crea un pdf con el estado de cuenta de el cliente especificado
* @param Array $args, $args['id_cliente'=>12[,'tipo_venta'=> 'credito | contado | saldo'] ], por default obtiene todas las compras del cliente
*/
public static function imprimirEstadoCuentaCliente($args)
{
//verificamos que se haya especificado el id del cliente
if (!isset($args['id_cliente'])) {
Logger::log("Error al obtener el estado de cuenta, no se ha especificado un cliente.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se ha especificado un cliente."}');
}
//verificamos que el cliente exista
if (!($cliente = ClienteDAO::getByPK($args['id_cliente']))) {
Logger::log("Error al obtener el estado de cuenta, no se tiene registro del cliente {$args['id_cliente']}.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se tiene registro del cliente ' . $args['id_cliente'] . '"}');
}
//obtenemos los datos del emisor
$estado_cuenta = estadoCuentaCliente($args);
//buscar los datos del emisor
if (!($emisor = PosConfigDAO::getByPK('emisor'))) {
Logger::log("no encuentro los datos del emisor");
die("no encuentro los datos del emisor");
}
$emisor = json_decode($emisor->getValue())->emisor;
$sucursal = SucursalDAO::getByPK($_SESSION['sucursal']);
if (!$sucursal) {
die("Sucursal invalida");
}
include_once 'librerias/ezpdf/class.pdf.php';
include_once 'librerias/ezpdf/class.ezpdf.php';
$pdf = new Cezpdf();
$pdf->selectFont('../server/librerias/ezpdf/fonts/Helvetica.afm');
//margenes de un centimetro para toda la pagina
$pdf->ezSetMargins(1, 1, 1, 1);
/*
* LOGO
*/
if (!($logo = PosConfigDAO::getByPK('url_logo'))) {
Logger::log("Verifique la configuracion del pos_config, no se encontro el camṕo 'url_logo'");
die("Verifique la configuracion del POS, no se encontro el url del logo");
}
//addJpegFromFile(imgFileName,x,y,w,[h])
//detectamos el tipo de imagen del logo
if (substr($logo->getValue(), -3) == "jpg" || substr($logo->getValue(), -3) == "JPG" || substr($logo->getValue(), -4) == "jpeg" || substr($logo->getValue(), -4) == "JPEG") {
$pdf->addJpegFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} elseif (substr($logo->getValue(), -3) == "png" || substr($logo->getValue(), -3) == "PNG") {
$pdf->addPngFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} else {
Logger::log("Verifique la configuracion del pos_config, la extension de la imagen del logo no es compatible");
die("La extension de la imagen usada para el logo del negocio no es valida.");
}
/* * ************************
* ENCABEZADO
* ************************* */
$e = "<b>" . self::readableText($emisor->nombre) . "</b>\n";
$e .= formatAddress($emisor);
$e .= "RFC: " . $emisor->rfc . "\n\n";
//datos de la sucursal
$e .= "<b>Lugar de expedicion</b>\n";
$e .= self::readableText($sucursal->getDescripcion()) . "\n";
$e .= formatAddress($sucursal);
$datos = array(array("emisor" => $e));
$pdf->ezSetY(puntos_cm(28.6));
$opciones_tabla = array();
$opciones_tabla['showLines'] = 0;
$opciones_tabla['showHeadings'] = 0;
$opciones_tabla['shaded'] = 0;
$opciones_tabla['fontSize'] = 8;
$opciones_tabla['xOrientation'] = 'right';
$opciones_tabla['xPos'] = puntos_cm(7.3);
$opciones_tabla['width'] = puntos_cm(11);
$opciones_tabla['textCol'] = array(0, 0, 0);
$opciones_tabla['titleFontSize'] = 12;
$opciones_tabla['rowGap'] = 3;
$opciones_tabla['colGap'] = 3;
$pdf->ezTable($datos, "", "", $opciones_tabla);
$cajero = UsuarioDAO::getByPK($_SESSION['userid'])->getNombre();
$datos = array(array("col" => "<b>Cajero</b>"), array("col" => self::readableText($cajero)), array("col" => "<b>Cliente</b>"), array("col" => self::readableText($cliente->getRazonSocial())), array("col" => "<b>Limite de Credito</b>"), array("col" => FormatMoney($estado_cuenta->limite_credito, DONT_USE_HTML)), array("col" => "<b>Saldo</b>"), array("col" => FormatMoney($estado_cuenta->saldo, DONT_USE_HTML)));
$pdf->ezSetY(puntos_cm(28.8));
$opciones_tabla['xPos'] = puntos_cm(12.2);
$opciones_tabla['width'] = puntos_cm(6);
$opciones_tabla['showLines'] = 0;
$opciones_tabla['shaded'] = 2;
$opciones_tabla['shadeCol'] = array(1, 1, 1);
//$opciones_tabla['shadeCol2'] = array(0.054901961, 0.756862745, 0.196078431);
$opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375);
$pdf->ezTable($datos, "", "", $opciones_tabla);
//roundRect($pdf, puntos_cm(12.2), puntos_cm(28.8), puntos_cm(6), puntos_cm(4.25));
/**
* ESTADO DE CUENTA
*/
$elementos = array(array('id_venta' => 'Venta', 'fecha' => 'Fecha', 'sucursal' => 'Sucursal', 'cajero' => 'Cajero', 'tipo_venta' => 'Tipo', 'tipo_pago' => 'Pago', 'total' => 'Total', 'pagado' => 'Pagado', 'saldo' => 'Saldo'));
foreach ($estado_cuenta->array_ventas as $venta) {
$array_venta = array();
$array_venta['id_venta'] = $venta['id_venta'];
$array_venta['fecha'] = $venta['fecha'];
$array_venta['sucursal'] = self::readableText($venta['sucursal']);
$array_venta['cajero'] = self::readableText($venta['cajero']);
$array_venta['cancelada'] = self::readableText($venta['cancelada']);
$array_venta['tipo_venta'] = self::readableText($venta['tipo_venta']);
//.........这里部分代码省略.........
示例12: array
}
}
}
if ($arySwimmer['devices'] != '') {
if ($hasnote === FALSE) {
$note++;
$aryRow['note'] = $note + 1 . ')';
$hasnote = TRUE;
$aryNotes[$note] = array('no' => $note + 1 . ')', 'text' => _('Hjælpemidler') . ' ' . $arySwimmer['distance'] . ': ' . $arySwimmer['devices']);
} else {
$aryNotes[$note]['text'] .= "\n" . _('Hjælpemidler') . ' ' . gettext_dist($arySwimmer['distance']) . ': ' . $arySwimmer['devices'];
}
}
$aryRow[$arySwimmer['distance']] = $arySwimmer['time'];
}
if (is_array($aryRow)) {
$aryData[$cnt] = $aryRow;
}
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica');
$pdf->ezSetY(830);
$pdf->ezText(_("Deltagerliste") . " " . $aryCompo['name'] . " - " . date('d-m-Y', strtotime($aryCompo['date'])), 18, array('justification' => 'center'));
$pdf->ezSetY(781);
$pdf->ezTable($aryData, array('Navn' => _('Navn'), 'Klub' => _('Klub'), '25' => _('25m'), '50' => _('50m'), '100' => _('100m'), 'note' => _('Note')), '', array('xPos' => 57, 'xOrientation' => 'right', 'width' => 481));
// 'Nr'=>'Nr',
if ($note >= 0) {
$pdf->ezTable($aryNotes, array('no' => '', 'text' => ''), '', array('showHeadings' => 0, 'showLines' => 0, 'shaded' => 0, 'xPos' => 57, 'xOrientation' => 'right', 'width' => 481, 'fontSize' => 10, 'titleFontSize' => 12, 'cols' => array('no' => array('width' => 30, 'justification' => 'center'))));
}
$pdf->ezStream();
}
$db->close();
示例13: dofreePDF
function dofreePDF()
{
global $mosConfig_live_site, $mosConfig_sitename, $mosConfig_offset;
global $mainframe, $database, $my;
$id = intval(mosGetParam($_REQUEST, 'id', 1));
$gid = $my->gid;
$now = _CURRENT_SERVER_TIME;
$nullDate = $database->getNullDate();
// query to check for state and access levels
$query = "SELECT a.*, cc.name AS category, s.name AS section, s.published AS sec_pub, cc.published AS cat_pub," . "\n s.access AS sec_access, cc.access AS cat_access, s.id AS sec_id, cc.id as cat_id" . "\n FROM #__content AS a" . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid" . "\n LEFT JOIN #__sections AS s ON s.id = cc.section AND s.scope = 'content'" . "\n WHERE a.id = " . (int) $id . "\n AND a.state = 1" . "\n AND a.access <= " . (int) $gid . "\n AND ( a.publish_up = " . $database->Quote($nullDate) . " OR a.publish_up <= " . $database->Quote($now) . " )" . "\n AND ( a.publish_down = " . $database->Quote($nullDate) . " OR a.publish_down >= " . $database->Quote($now) . " )";
$database->setQuery($query);
$row = NULL;
if ($database->loadObject($row)) {
/*
* check whether category is published
*/
if (!$row->cat_pub && $row->catid) {
mosNotAuth();
return;
}
/*
* check whether section is published
*/
if (!$row->sec_pub && $row->sectionid) {
mosNotAuth();
return;
}
/*
* check whether category access level allows access
*/
if ($row->cat_access > $gid && $row->catid) {
mosNotAuth();
return;
}
/*
* check whether section access level allows access
*/
if ($row->sec_access > $gid && $row->sectionid) {
mosNotAuth();
return;
}
include 'includes/class.ezpdf.php';
$params = new mosParameters($row->attribs);
$params->def('author', !$mainframe->getCfg('hideAuthor'));
$params->def('createdate', !$mainframe->getCfg('hideCreateDate'));
$params->def('modifydate', !$mainframe->getCfg('hideModifyDate'));
$row->fulltext = pdfCleaner($row->fulltext);
$row->introtext = pdfCleaner($row->introtext);
$pdf = new Cezpdf('a4', 'P');
//A4 Portrait
$pdf->ezSetCmMargins(2, 1.5, 1, 1);
$pdf->selectFont('./fonts/Helvetica.afm');
//choose font
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
// footer
$pdf->addText(250, 822, 6, $mosConfig_sitename);
$pdf->line(10, 40, 578, 40);
$pdf->line(10, 818, 578, 818);
$pdf->addText(30, 34, 6, $mosConfig_live_site);
$pdf->addText(250, 34, 6, _PDF_POWERED);
$pdf->addText(450, 34, 6, _PDF_GENERATED . ' ' . date('j F, Y, H:i', time() + $mosConfig_offset * 60 * 60));
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
$pdf->ezSetDy(30);
$txt1 = $row->title;
$pdf->ezText($txt1, 14);
$txt2 = AuthorDateLine($row, $params);
$pdf->ezText($txt2, 8);
$txt3 = $row->introtext . "\n" . $row->fulltext;
$pdf->ezText($txt3, 10);
$pdf->ezStream();
} else {
mosNotAuth();
return;
}
}
示例14: Cezpdf
}
print "</div>";
?>
<script language='JavaScript'>
var win = top.printLogPrint ? top : opener.top;
win.printLogPrint(window);
</script>
</div>
</body>
</html>
<?php
exit;
} else {
//print letterhead to pdf
$pdf = new Cezpdf();
$pdf->selectFont('Times-Bold');
$pdf->ezSetCmMargins(3, 1, 1, 1);
$pdf->ezText($physician_name, 12);
$pdf->ezText($practice_address, 12);
$pdf->ezText($practice_city . ', ' . $practice_state . ' ' . $practice_zip, 12);
$pdf->ezText($practice_phone . ' (' . xl('Voice') . ')', 12);
$pdf->ezText($practice_phone . ' (' . xl('Fax') . ')', 12);
$pdf->ezText('', 12);
$pdf->ezText(date("l, F jS, Y"), 12);
$pdf->ezText('', 12);
$pdf->selectFont('Helvetica');
$pdf->ezText($content, 10);
$pdf->selectFont('Times-Bold');
$pdf->ezText('', 12);
$pdf->ezText('', 12);
if ($_GET['signer'] == 'patient') {
示例15: alert
$ls_conceptoreporte,$ls_codubifis,$ls_codpai,$ls_codest,$ls_codmun,$ls_codpar,
$ls_subnomdes,$ls_subnomhas,$ls_orden); // Cargar el DS con los datos de la cabecera del reporte
}
if(($lb_valido==false) || ($io_report->rs_data->RecordCount()==0)) // Existe algún error ó no hay registros
{
print("<script language=JavaScript>");
print(" alert('No hay nada que Reportar');");
print(" close();");
print("</script>");
}
else // Imprimimos el reporte
{
error_reporting(E_ALL);
set_time_limit(1800);
$io_pdf=new Cezpdf('LETTER','portrait'); // Instancia de la clase PDF
$io_pdf->selectFont('../../shared/ezpdf/fonts/Helvetica.afm'); // Seleccionamos el tipo de letra
$io_pdf->ezSetCmMargins(3,1,1,2); // Configuración de los margenes en centímetros
uf_print_encabezado_pagina($ls_titulo,$ls_desnom,$ls_periodo,$io_pdf); // Imprimimos el encabezado de la página
$li_totrow=$io_report->rs_data->RecordCount();
$li_i=1;
while((!$io_report->rs_data->EOF)&&($lb_valido))
{
$li_toting=0;
$li_totded=0;
$ls_codper=$io_report->rs_data->fields["codper"];
$ls_cedper=$io_report->rs_data->fields["cedper"];
$ls_nomper=$io_report->rs_data->fields["apeper"].", ".$io_report->rs_data->fields["nomper"];
$ls_descar=$io_report->rs_data->fields["descar"];
$ls_codcueban=$io_report->rs_data->fields["codcueban"];
$li_total=$io_report->rs_data->fields["total"];
$ls_unidad=$io_report->rs_data->fields["minorguniadm"].$io_report->rs_data->fields["ofiuniadm"].