⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usage.php

📁 国外很不错的一个开源OA系统Group-Office
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<div class="method-definition"  style="background-position: 252px bottom;"><a name="methodget_host" id="get_host"><!-- --></a>   <div class="method-header">    <span class="method-title">get_host</span> (line <span class="line-number">220</span>)  </div> <p class="short-description">Returns the base hostname</p>    <div class="method-signature">    <span class="method-result">string</span>    <span class="method-name">get_host</span>()  </div></div><div class="method-definition" style="background-position: 498px bottom;"><a name="methodget_protocol" id="get_protocol"><!-- --></a><div class="method-header">  <span class="method-title">get_protocol</span> (line <span class="line-number">213</span>)</div> <p class="short-description">Returns the protocol in use</p>  <div class="method-signature">    <span class="method-result">string</span>    <span class="method-name">get_protocol</span>()  </div></div><div class="method-definition" style="background-position: 39px bottom;"><a name="methodget_tree" id="get_tree"><!-- --></a><div class="method-header">  <span class="method-title">get_tree</span> (line <span class="line-number">182</span>)</div> <p class="short-description">Returns the underlying Frame_Tree object</p>  <div class="method-signature">    <span class="method-result">Frame_Tree</span>    <span class="method-name">get_tree</span>()  </div></div><div class="method-definition" style="background-position: 653px bottom;"><a name="methodload_html" id="load_html"><!-- --></a><div class="method-header">  <span class="method-title">load_html</span> (line <span class="line-number">272</span>)</div> <p class="short-description">Loads an HTML string</p><p class="description"><p>Parse errors are stored in the global array _dompdf_warnings.</p></p>  <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">load_html</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$str</span>)  </div>     <ul class="parameters">   <li>     <span class="var-type">string</span>     <span class="var-name">$str</span><span class="var-description">: HTML text to load</span></li>   </ul></div><div class="method-definition" style="background-position: 479px bottom;"><a name="methodload_html_file" id="load_html_file"><!-- --></a><div class="method-header">  <span class="method-title">load_html_file</span> (line <span class="line-number">245</span>)</div> <p class="short-description">Loads an HTML file</p><p class="description"><p>Parse errors are stored in the global array _dompdf_warnings.</p></p>  <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">load_html_file</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)  </div>    <ul class="parameters">      <li>    <span class="var-type">string</span>    <span class="var-name">$file</span><span class="var-description">: a filename or url to load</span></li>    </ul></div><div class="method-definition" style="background-position: 182px bottom;"><a name="methodoutput" id="output"><!-- --></a><div class="method-header">  <span class="method-title">output</span> (line <span class="line-number">451</span>)</div> <p class="short-description">Returns the PDF as a string</p>  <div class="method-signature">    <span class="method-result">string</span>    <span class="method-name">output</span>()  </div></div><div class="method-definition" style="background-position: 741px bottom;"><a name="methodrender" id="render"><!-- --></a><div class="method-header">  <span class="method-title">render</span> (line <span class="line-number">373</span>)</div> <p class="short-description">Renders the HTML to PDF</p>    <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">render</span>()  </div></div><div class="method-definition" style="background-position: 824px bottom;"><a name="methodset_base_path" id="set_base_path"><!-- --></a><div class="method-header">  <span class="method-title">set_base_path</span> (line <span class="line-number">206</span>)</div> <p class="short-description">Sets the base path</p>  <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">set_base_path</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)  </div>    <ul class="parameters">  <li>    <span class="var-type">string</span>    <span class="var-name">$path</span></li>  </ul></div><div class="method-definition" style="background-position: 519px bottom;"><a name="methodset_host" id="set_host"><!-- --></a><div class="method-header">  <span class="method-title">set_host</span> (line <span class="line-number">199</span>)</div>  <p class="short-description">Sets the base hostname</p>    <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">set_host</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>)  </div>    <ul class="parameters">  <li>     <span class="var-type">string</span>     <span class="var-name">$host</span></li>     </ul></div><div class="method-definition"  style="background-position: 391px bottom;"><a name="methodset_paper" id="set_paper"><!-- --></a><div class="method-header">  <span class="method-title">set_paper</span> (line <span class="line-number">353</span>)</div> <p class="short-description">Sets the paper size &amp; orientation</p>    <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">set_paper</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$size</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$orientation</span> = <span class="var-default">"portrait"</span>])  </div>    <ul class="parameters">  <li>    <span class="var-type">string</span>    <span class="var-name">$size</span><span class="var-description">: 'letter', 'legal', 'A4', etc. See CPDF_Adapter::$PAPER_SIZES</span></li>  <li>    <span class="var-type">string</span>    <span class="var-name">$orientation</span><span class="var-description">: 'portrait' or 'landscape'</span></li>  </ul></div><div class="method-definition" style="background-position: 672px bottom;"><a name="methodset_protocol" id="set_protocol"><!-- --></a><div class="method-header">  <span class="method-title">set_protocol</span> (line <span class="line-number">192</span>)</div> <p class="short-description">Sets the protocol to use (http://, file://, ftp:// etc.)</p>    <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">set_protocol</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$proto</span>)  </div>    <ul class="parameters">  <li>    <span class="var-type">string</span>    <span class="var-name">$proto</span></li>  </ul></div><div class="method-definition" style="background-position: 146px bottom;"><a name="methodstream" id="stream"><!-- --></a><div class="method-header">  <span class="method-title">stream</span> (line <span class="line-number">441</span>)</div> <p class="short-description">Streams the PDF to the client</p><p class="description"><p>The file will always open a download dialog.  The options parametercontrols the output headers.  Accepted headersare:<br/><br/>'Accept-Ranges' =&gt; 1 or 0 - if this is not set to 1, then thisheader is not included, off by default. This header seems to havecaused some problems despite the fact that it is supposed to solvethem, so I am leaving it off by default.<br/><br/>'compress' = &gt; 1 or 0 - apply content stream compression, this ison (1) by default<br/><br/>'Attachment' =&gt; 1 or 0 - if 1, force the browser to open a downloaddialog, on (1) by default</p></p>    <div class="method-signature">    <span class="method-result">void</span>    <span class="method-name">stream</span>(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])  </div>     <ul class="parameters">       <li>     <span class="var-type">string</span>     <span class="var-name">$filename</span><span class="var-description">: the name of the streamed file</span>      </li>       <li>     <span class="var-type">array</span>     <span class="var-name">$options</span><span class="var-description">: header options (see above)</span>      </li>     </ul></div><a name="inline"> </a><h2>Inline PHP Support</h2><p>dompdf supports two varieties of inline PHP code.  All PHP evaluation iscontrolled by the <code>DOMPDF_ENABLE_PHP</code> configuration option.  If it is set tofalse, then no PHP code is executed.  Otherwise, PHP is evaluated in twopasses:</p><p>The first pass is useful for inserting dynamic data into your PDF.  You cando this by embedding &lt;?php ?&gt; tags in your HTML file, as you would in anormal .php file.  This code is evaluated prior to parsing the HTML, so youcan echo any text or markup and it will appear in the rendered PDF.</p><p>The second pass is useful for performing drawing operations on theunderlying PDF class directly.  You can do this by embedding PHP code within&lt;script type="text/php"&gt; &lt;/script&gt; tags.  This code is evaluatedduring the rendering phase and you have access to a few internal objects andoperations.  In particular, the <code>$pdf</code> variable is the current instance ofCanvas.  Using this object, you can write and draw directly on thecurrent page.  Using the <code>Canvas::open_object()</code>,<code>Canvas::close_object()</code> and<code>Canvas::add_object()</code> methods, you can create text anddrawing objects that appear on every page of your PDF (useful for headers &amp;footers).</p><p>The following variables are defined for you during the second pass of PHPexecution:</p><pre>  $pdf         the current instance of Canvas  $PAGE_NUM    the current page number  $PAGE_COUNT  the total number of pages in the document</pre><p>For more complete documentation of the Canvas API, see the <ahref="http://www.digitaljunkies.ca/dompdf/doc/">API documentation</a>.</p><?php include("foot.inc");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -