我正在尝试通过<textarea id="editor" rows="10" cols="30" style="width:740px;height:240px"><p></p> <p> The below Unicode characters are needs to reflected in PDF with <strong>Arial</strong> font.<br /> Please click on the below <strong>Save As PDF</strong> button to download the PDF file. </p>
<p>ð é ê ȁ ȁ ȃ ï î<br />
</p>
</textarea>
</br>
<input type="button" id="button" value="Save As PDF" />
</br>
</br>
取某样东西,但一切似乎都很好,但停留在一部分上,我正在使用kendo.pdf.defineFont({
"DejaVu Sans": "http://kendo.cdn.telerik.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans.ttf",
"DejaVu Sans|Bold": "http://kendo.cdn.telerik.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans-Bold.ttf",
"DejaVu Sans|Bold|Italic": "http://kendo.cdn.telerik.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf",
"DejaVu Sans|Italic": "http://kendo.cdn.telerik.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf"
});
var editor = $("#editor").kendoEditor({
tools: ["viewHtml"]
}).data("kendoEditor");
$('#button').click(function() {
if (editor != null) {
editor.saveAsPDF().then(function() {
alert("Saved as PDF");
});
}
});
函数来提取file_get_html
,问题是要提取所有根据该特定div或ul,请阅读以下代码。
尝试从这些行中提取
foreach
使用
<li>
问题是3 <ul class="x-name y-name">
<li>example 1</li>
<li>example 2</li>
<li>example 3</li>
</ul>
完成后没有返回,它继续向下钻取所有相同的名称foreach($html->find("div#master") as $e){
foreach ($e->find("otherobject]") as $es){
$val["myuse-".strip_tags($es)] = "";
foreach($e->find("ul[class='x-name b-name'] li") as $elist){
$val["myuse-".strip_tags($es)] .= "<li>".strip_tags($elist->innertext)."</li>";
}
}
}
我希望它在<li>
数字完成后停止并返回上一个<li>
,当选择了名字时,它将搜索下一个字符。