将HTML转换为rtf [英] Convert a html to rtf
问题描述
我几乎完成了编码,但是在第17行显示了错误,即致命错误:在第17行的C:\ .........中调用了未定义的函数PostForm(). ...请任何人帮助我...
-------------------------------------------------- ----------------------------
//RTF
include("class_rtf.php");
if(isset($ _ POST [''Publish''])){
//$ selected_radio = $ _POST [''group1''];
//生成RTF
//如果(($ selected_radio ==``rRTF'')){
//echo"RTF Selected";
返回PostForm();
$ rtf =新的rtf("rtf_config.php");
$ rtf-> setPaperSize(5);
$ rtf-> setPaperOrientation(1);
$ rtf-> setDefaultFontFace(0);
$ rtf-> setDefaultFontSize(24);
$ rtf-> setAuthor("noginn");
$ rtf-> setOperator("me@noginn.com");
$ rtf-> setTitle("RTF Document");
$ rtf-> addColour(#000000");
$ rtf-> addText($ _ POST [''text'']);
$ rtf-> getDocument();
//}
}
函数clearall()
{
回显确定";
"txtTitle.txt =''''";
}
?>
< script language ="javascript1.2">
函数Init(){
wysiwyg.document.designMode =``开'';
}
函数PostForm(){
//var rtf = wysiwyg.document.body.innerHTML;
var rtf = document.publish.text.value;
返回true;
}
</script>
<!DOCTYPE HTML PUBLIC-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
< html>
< head>
< meta http-equiv ="Content-Type" content ="text/html; charset = windows-1252">
<!-pdf->
< style type =''text/css''>
fieldset {padding:12px}
身体{font-size:small}
</style>
</head>
< body onLoad ="Init()">
< form name ="publish" method ="post" target ="_ blank" action =">
I almost done with the coding, but it showing error on line 17 i.e Fatal error: Call to undefined function PostForm() in C:\.............. on line 17.... plz any one help me out......
------------------------------------------------------------------------------
//RTF
include("class_rtf.php");
if (isset($_POST[''Publish''])) {
// $selected_radio = $_POST[''group1''];
//generate RTF
// if ($selected_radio == ''rRTF'') {
// echo "RTF Selected";
return PostForm();
$rtf = new rtf("rtf_config.php");
$rtf->setPaperSize(5);
$rtf->setPaperOrientation(1);
$rtf->setDefaultFontFace(0);
$rtf->setDefaultFontSize(24);
$rtf->setAuthor("noginn");
$rtf->setOperator("me@noginn.com");
$rtf->setTitle("RTF Document");
$rtf->addColour("#000000");
$rtf->addText($_POST[''text'']);
$rtf->getDocument();
// }
}
function clearall()
{
echo "OK";
"txtTitle.txt=''''";
}
?>
<script language="javascript1.2">
function Init() {
wysiwyg.document.designMode = ''On'';
}
function PostForm() {
// var rtf = wysiwyg.document.body.innerHTML;
var rtf = document.publish.text.value;
return true;
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!-- pdf -->
<style type=''text/css''>
fieldset{padding:12px}
body{font-size:small}
</style>
</head>
<body onLoad="Init()">
<form name="publish" method="post" target="_blank" action="">
内容发布
标题: | <输入type ="text" name ="title" id ="txtTitle"> |
作者: | <输入type ="text" name ="author" id ="txtAuthor"> |
电子邮件ID: | <输入type ="text" name ="url" id ="txtEmail"> |
复制文本以进行发布: | <!-<脚本语言="JavaScript" type ="text/javascript" src ="html_rtf \ wysiwyg_beta \ wysiwyg.js"> -> < textarea id ="taContent" name ="content" style ="height:170px; width:500px;"></textarea> <!-< script language ="javascript1.2"> generate_wysiwyg(''taContent''); </script> -> |
选择输出格式 |
<输入类型="radio" name ="group1" value ="rRTF"> RTF <!-<输入类型="radio" name ="group1" value ="rPDF"> PDF < input type ="radio" name ="group1" value ="rEPUB"> EPUB -> |
<输入类型=提交" name ="Publish" value ="Publish"> |
Content Publish
Title : | <input type="text" name="title" id="txtTitle"> |
Author : | <input type="text" name="author" id="txtAuthor"> |
E-mail id : | <input type="text" name="url" id="txtEmail"> |
Copy the text for Publish : | <!-- <script language="JavaScript" type="text/javascript" src="html_rtf\wysiwyg_beta\wysiwyg.js"> --> <textarea id="taContent" name="content" style="height: 170px; width: 500px;"></textarea> <!-- <script language="javascript1.2"> generate_wysiwyg(''taContent''); </script> --> |
Select the output format |
<input type="radio" name="group1" value="rRTF">RTF <!-- <input type="radio" name="group1" value="rPDF">PDF <input type="radio" name="group1" value="rEPUB">EPUB --> |
<input type="submit" name="Publish" value="Publish"> |
</body>
</html>
</body>
</html>
推荐答案
_POST [''Publish''])){
//
_POST[''Publish''])) {
//
selected_radio =
selected_radio =
_POST [''group1''];
//生成RTF
//如果((
_POST[''group1''];
//generate RTF
// if (
这篇关于将HTML转换为rtf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!