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


PHP mPDF::Bookmark方法代码示例

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


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

示例1: pdf

 public function pdf()
 {
     require_once dirname(APP_SYS_PATH) . "/plugins/mpdf/mpdf.php";
     //模拟数据
     $users = array();
     for ($i = 1; $i < 10; $i++) {
         $user = array("id" => "2015" . $i, "name" => "用户" . $i, "age" => "1" . $i);
         $users[] = $user;
     }
     $this->assign("users", $users);
     $html = $this->fetch("pdf.html");
     $mpdf = new mPDF("utf-8-s");
     $mpdf->Bookmark("test pdf");
     $mpdf->WriteHTML($html);
     $mpdf->Output();
 }
开发者ID:Honvid,项目名称:HCMS,代码行数:16,代码来源:TestController.php

示例2: mPDF

<?php

include 'mpdf.php';
$mpdf = new mPDF();
$mpdf->Bookmark('Start of the document');
$mpdf->WriteHTML("<!DOCTYPE html><html lang='en'>  <head>\t<!--<base href='http://reyvillamar.info/demo/slvprice/responsive//demo/responsive-tables/'>--><!--[if lte IE 6]></base><![endif]-->    <meta charset='utf-8'>\r\n    <title>Responsive Tables Demo</title>\r\n    <meta name='viewport' content='width=device-width, initial-scale=1'>\r\n    <meta name='description' content='A demo of some techniques for developing responsive tables.'>\r\n    <link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/bootstrap.min.css' rel='stylesheet'>\r\n\t<style>body { padding-top: 60px; }\r\n\t  table { width: 100%; }\r\n\t  td, th {text-align: left; white-space: nowrap;}\r\n\t  td.numeric, th.numeric { text-align: right; }\r\n\t  h2, h3 {margin-top: 1em;}\r\n\t  section {padding-top: 40px;}\r\n    </style>\r\n    <link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/bootstrap-responsive.min.css' rel='stylesheet'>\r\n\t<link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/unseen.css' rel='stylesheet'>\r\n\t<link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/flip-scroll.css' rel='stylesheet'>\r\n\t<link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/no-more-tables.css' rel='stylesheet'>\r\n\t<link href='http://reyvillamar.info/demo/slvprice/responsive/assets/css/prettify.css' rel='stylesheet'>\r\n\t\r\n    <!--[if lt IE 9]>\r\n      <script src='//html5shim.googlecode.com/svn/trunk/html5.js'></script>\r\n    <![endif]-->\r\n  </head>\r\n  <body style='margin-left:50px;margin-right:50px;margin-top:-30px;'>\r\n   \t  <section id='no-more-tables'>\r\n   \t  <img src='http://reyvillamar.info/demo/slvprice/images/rey_header.png' style='width:100%;' />\r\n\t\r\n\t\t  <br/><br/>\r\nWarm greetings from SLV Digital Solution Co.!\r\n<br/><br/>\r\n\r\nIt is our great joy to present to you our products/services for your organization. As per your requirements, please see the quotation below for your satisfaction. Our group is always ready to extend its full flexibility to meet the demands of our client for better and excellent service.\r\n\r\n</p>\r\n\t\t  <table class='table-bordered table-striped table-condensed cf'>\r\n\t\t\t  <thead class='cf'>\r\n\t\t\t\t  <tr>\r\n\t\t\t\t\t    <th>Particular</th>\r\n\t\t\t\t\t  <th class='numeric'>Quantity</th>\r\n\t\t\t\t\t  <th class='numeric'>Price</th>\r\n\t\t\t\t\t  <th class='numeric'>Total</th>                                             \r\n\t\t\t\t  </tr>\r\n\t\t\t  </thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t\r\n\t\t\t\t </table>\r\n<p>\t\t  \r\n<br/>\r\n\r\nShould you find our offer attractive and merit your consideration, we are willing to make actual presentation of sample and our terms of contract. If you also want other services, we are willing to make quotation as you request us to do so.\r\n<br/>\r\n<br/>\r\n\r\n\r\nThank you for giving us opportunity to offer our services and express our passion for excellence. We’re waiting for your favorable response.\r\nSincerely Yours,\r\n<br/>\r\n<br/>\r\n\r\nRey Villamar\r\n<hr>\r\n<br/>\r\n\r\nTerms and conditions upon agreed:\r\n<br/><br/>\r\n1. SLV Digital Solution Co. shall provide a detailed Services Agreement and the Client shall forward a Purchased Order.\r\n<br/><br/>\r\n2. Once the Client orders the Products/Services and agrees on the terms and conditions provided by the Supplier, payment shall be given for the 50% of the total amount of the Products/Services, then the remaining 50% as complete payment shall be given upon the delivery of the Products/Services.\r\n<br/>\r\n<br/>\r\n\r\n<p style='color: red;'>\r\nSLV BANK ACCOUNT:<br/>\r\nBANK: BDO SM VALENZUELA<br/>\r\nACCOUNT NAME: SLV DIGITAL SOLUTION CO.<br/>\r\nACCOUNT NUMBER: 002090418229<br/>\r\n</p>\r\n3.  The Supplier shall deliver the Products/Services within a maximum of 15 working days (Saturdays and Sundays not included) upon giving the down payment.\r\n\r\n</p>\r\n<img src='http://reyvillamar.info/demo/slvprice/images/total_quality_service.png' style='height:100px;' />\r\n\t  </section>\r\n    </div> <!-- /container -->\r\n\r\n    <script src='assets/js/jquery-1.7.1.min.js'></script>\r\n    <script src='assets/js/bootstrap.min.js'></script>\r\n\t<script src='assets/js/prettify.js'></script>\r\n\t<script>\r\n\t\t\$(function(){\r\n\t\t\tprettyPrint();\r\n\t\t});\r\n\t</script>\r\n\t\r\n\r\n\t<script type='text/javascript'>\r\n\t<!--//--><![CDATA[//><!--\r\n\ttry {var pageTracker = _gat._getTracker('UA-55411-1');pageTracker._trackPageview();} catch(e) {}\r\n\t//--><!]]>\r\n\t</script>\r\n\t\r\n  </body>\r\n</html>");
$mpdf->Output();
开发者ID:AIMHIGHTUITION,项目名称:beta,代码行数:7,代码来源:index.php

示例3: nitro_render_pdf


//.........这里部分代码省略.........
</b></div><br />
		<div id="nitroreportpdf_progress" class="nitroreportpdf_graph" style=" margin-left: auto ; margin-right: auto;">
			<div id="nitroreportpdf_bar" style="width:0%">
				<span id="nitroreportpdf_bar_text">0%</span>
			</div>
		</div>
<?php 
            /*	========================> 				1. COVER	*/
            $this->SetBarWidth(number_format(floor(1 * (100 / $PROGRESSBAR_PARTS)), 2, '.', ''));
            @ob_flush();
            @flush();
            $HTML_COVER = '
			<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
			<div style="letter-spacing: 5px;text-align: center;font-weight: bold;font-size: 20pt;text-transform:uppercase;">' . get_string('protocol_exam', 'quiz_nitroreportpdf') . '</div>
			<br /><br /><br />
			<div style="text-align: center;">
			<table border="0" width="100%">
				<tr>
					<th style="text-align: center;font-size: 14pt;">' . get_string('course', 'quiz_nitroreportpdf') . ': </th>
					<td style="text-align: center;font-size: 14pt;">' . $info_course->fullname . '</td>
				</tr>
				<tr>
					<th style="text-align: center;font-size: 14pt;">' . get_string('exam', 'quiz_nitroreportpdf') . ': </th>
					<td style="text-align: center;font-size: 14pt;">' . $info_quiz->name . '</td>
				</tr>
				<tr>
					<th style="text-align: center;font-size: 14pt;">' . get_string('date', 'quiz_nitroreportpdf') . ': </th>
					<td style="text-align: center;font-size: 14pt;">' . date('d.m.Y, H:i') . '</td>
				</tr>
			</table>
			</div>
			';
            $mpdf->AddPage();
            $mpdf->Bookmark('1. ' . get_string('cover', 'quiz_nitroreportpdf'), 0);
            $mpdf->WriteHTML($HTML_COVER);
            if ($generate_html_file) {
                $html_contents .= $NREQ . '<hr noshade>';
            }
            /*	========================> 				2. Short info about test	*/
            $this->SetBarWidth(number_format(floor(2 * (100 / $PROGRESSBAR_PARTS)), 2, '.', ''));
            @ob_flush();
            @flush();
            $timeopen = '';
            $timeclose = '';
            if (!empty($info_quiz->timeopen) || $info_quiz->timeopen > 0) {
                $timeopen = '<tr>
					<th style="text-align: left;">' . get_string('timeopen', 'quiz_nitroreportpdf') . ':</th>
					<td style="text-align: left;">' . date('d.m.Y H:i', $info_quiz->timeopen) . '</td>
				</tr>';
            }
            if (!empty($info_quiz->timeclose) || $info_quiz->timeclose > 0) {
                $timeclose = '<tr>
					<th style="text-align: left;">' . get_string('timeclose', 'quiz_nitroreportpdf') . ':</th>
					<td style="text-align: left;">' . date('d.m.Y H:i', $info_quiz->timeclose) . '</td>
				</tr>';
            }
            if (!empty($info_quiz->timelimit) || $info_quiz->timelimit > 0) {
                $nitro_convert_time_s = $this->nitro_convert_time($info_quiz->timelimit);
                $timelimit = '<tr>
					<th style="text-align: left;">' . get_string('limittime', 'quiz_nitroreportpdf') . ':</th>
					<td style="text-align: left;">' . $nitro_convert_time_s . '</td>
				</tr>';
            }
            switch ($info_quiz->grademethod) {
                case '2':
                    $grademethod = get_string('avggrade', 'quiz_nitroreportpdf');
开发者ID:nitro2010,项目名称:nitro_moodle_plugins,代码行数:67,代码来源:report.php


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