本文整理汇总了PHP中Cezpdf::ezProcessText方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::ezProcessText方法的具体用法?PHP Cezpdf::ezProcessText怎么用?PHP Cezpdf::ezProcessText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::ezProcessText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ezProcessText
function ezProcessText($text)
{
// this function will intially be used to implement underlining support, but could be used for a range of other
// purposes
$text = parent::ezProcessText($text);
$text = str_replace(array('<UL>', '</UL>', '<LI>', '</LI>', '<OL>', '</OL>', '</ol>', '<blockquote>', '</blockquote>'), array('<ul>', '</ul>', '<li>', '</li>', '<ol>', '</ul>', '</ul>', "<C:indent:20>\n", "<C:indent:-20>"), $text);
// $text = str_replace("<ul>\n","<ul>",$text);
$text = preg_replace("/\n+\\s*(<ul>|<ol>)/", "\n\\1", $text);
// some problemos fixed here - hack
$text = preg_replace('/<text [^]]+>/', '', $text);
$text = str_replace("<li>\n", "<li>", $text);
$text = preg_replace("/\n+\\s*<li>/", "<li>", $text);
$text = str_replace("<mybr>", "\n", $text);
$text = str_replace('</li></ul>', '</ul>', $text);
$text = preg_replace("/^\n(\\d+\\s+.*)/", '\\1', $text);
$search = array('<ul>', '</ul>', '<ol>', '<li>', '</li>');
$replace = array("<C:indent:20>\n", "\n<C:indent:-20>", "\n<C:indent:20:ordered>\n", '<C:bullet>', "\n");
$text = str_replace($search, $replace, $text);
$text = preg_replace("/([^\n])<C:bullet/", "\\1\n<C:bullet", $text);
if (false) {
$fp = @fopen("C:/Documents and Settings/Owner/Desktop/pdfsourceorig.txt", 'a');
if ($fp) {
fwrite($fp, $text);
fclose($fp);
}
}
return $text;
}