當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。