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


PHP PHPRtfLite::sendRtf方法代码示例

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


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

示例1: while

        $formatH2->setSpaceAfter(6);
        $formatP = new PHPRtfLite_ParFormat();
        $formatP->setSpaceAfter(3);
        // Содержание страницы
        $section = $rtf->addSection();
        $section->writeText('Used Cars for Sale', $fontH1, $formatH1);
        while ($row = getRow($result)) {
            $section->writeText($row['make'], $fontH2, $formatH2);
            $section->setNoBreak();
            $section->writeText('<bullet> Price: $' . number_format($row['price'], 2), $fontP, $formatP);
            $section->writeText('<bullet> Mileage: ' . number_format($row['mileage']), $fontP, $formatP);
            $section->writeText('<bullet> Transmission: ' . $row['transmission'], $fontP, $formatP);
            $section->writeText($row['description'] . '<hr>', $fontP, $formatP);
        }
        // Выходной файл
        $rtf->sendRtf('cars.rtf');
    } catch (Exception $e) {
        $error = $e->getMessage();
    }
}
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Used Cars</title>
  <link href="styles/styles.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="wrapper">
开发者ID:sbogdanov108,项目名称:db_to_text,代码行数:31,代码来源:cars_richtext.php

示例2: PHPRtfLite

    /*$project_id = $_GET["project_id"];
    	$ps_id = $_GET["ps_id"];
    	
    	$qup = mysql_query("select * from t_project where project_id = $project_id");
    	$project_info = mysql_fetch_object($qup);
    	
    	$qup = mysql_query("select *,date_format(ps_test_tanggal,'%d-%b-%Y') ps_test_tanggal2 from t_project_source where ps_id = $ps_id");
    	$project_source_info = mysql_fetch_object($qup);*/
}
// Init
$null = null;
PHPRtfLite::registerAutoloader();
$parFormat = new PHPRtfLite_ParFormat();
$rtf = new PHPRtfLite();
//setLandscape()
$rtf->setLandscape();
//$rtf->setMargins(3,2,3,2);
//_createHeader($project_info);
$rtf->setMargins(3, 2, 3, 2);
$sect =& $rtf->addSection();
//_createTitle($project_info);
_createTable();
//
/*$sect = &$rtf->addSection();
	_createTable(3,3);
	//
	$sect = &$rtf->addSection();
	_createUraian();*/
$namafile = "Schedule.rtf";
$rtf->sendRtf($namafile);
开发者ID:TRWirahmana,项目名称:sekretariat,代码行数:30,代码来源:prin_rtf.php


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