Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


V.santosh kumar
rtf
0 Answer(s)      3 years and 5 months ago
Posted in : JSP-Servlet


Hi every one plz give me answer for below question ASAP

I created one JSP(used pre defined javascript in jsp to get rtf format in browser) which creats RTF Format in browser to enter data.

MY question is after i enterd data when click on preview button it as to seperate data for every 42 lines after every 42 lines of data one state line as to come to clearly known to the viewer.

how to do this

please help me to solve this

MY code

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title>Cross-Browser Rich Text Editor (RTE)</title>
    <!-- Metadata generated by http://web-webpages.com/META/mk-metas.html -->
    <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
    <META NAME="keywords" CONTENT="cross-browser rich text editor, rte, textarea, htmlarea, content management, cms, blog, internet explorer, firefox, safari, opera, netscape, konqueror">
    <META NAME="description" CONTENT="The cross-browser rich-text editor (RTE) is based on the designMode() functionality introduced in Internet Explorer 5, and implemented in Mozilla 1.3+ using the Mozilla Rich Text Editing API.">
    <META NAME="author" CONTENT="Kevin Roth">
    <META NAME="ROBOTS" CONTENT="ALL">
    <!-- html2xhtml.js written by Jacob Lee <letsgolee@lycos.co.kr> //-->
    <script language="JavaScript" type="text/javascript" src="html2xhtml.min.js"></script>
    <script language="JavaScript" type="text/javascript" src="richtext_compressed.js"></script>
</head>
<body>


<!-- START Demo Code -->
<form name="RTEDemo" action="demo.jsp" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
//writeRichText('rte1', 'here's the "<em>preloaded</em> <b>content</b>"', 400, 200, true, false);
<!--
function submitForm() {
    //make sure hidden and iframe values are in sync for all rtes before submitting form
    updateRTEs();

    //alert("rte1 = " + document.RTEDemo.rte1.value);
    //var rte1 = new richTextEditor('rte1');
    return true;
}

//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML)
initRTE("../cbrte/images/", "../cbrte/", "",false);
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>

<script language="JavaScript" type="text/javascript">
<!--
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
<%
//format content for preloading
String disply = "";

if (request.getParameter("rte1") != null) disply = request.getParameter("rte1");
if (disply == "") {
    //rte1 = "here's the " + (char)13 + "\"preloaded <b>content</b>\"";
    disply = rteSafe(disply);

} else {
    //retrieve posted value
    disply = rteSafe(disply);

}
System.out.println(disply);

%>
rte1.html = '<%=disply%>';

//rte1.toggleSrc = false;
rte1.build();
//-->
</script>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
<%!
public static String rteSafe(String strText) {
    //returns safe code for preloading in the RTE
    String tmpString = strText;
    //System.out.println(tmpString);

    //convert all types of single quotes
    /*tmpString = tmpString.replace((char)145, (char)39);
    tmpString = tmpString.replace((char)146, (char)39);
    tmpString = tmpString.replace("'", "'");

    //convert all types of double quotes
    tmpString = tmpString.replace((char)147, (char)34);
    tmpString = tmpString.replace((char)148, (char)34);
//  tmpString = tmpString.replace("\"", "\"");

    //replace carriage returns & line feeds
    tmpString = tmpString.replace((char)10, (char)32);
    tmpString = tmpString.replace((char)13, (char)32);*/

    return tmpString;
}
%>
<!-- END Demo Code -->

</body>
</html>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
rtf
rtf  Hi every one plz give me answer for below question ASAP I created one JSP(used pre defined javascript in jsp to get rtf format in browser) which creats RTF Format in browser to enter data. MY question is after i
rtf_jsp_javascript
rtf_jsp_javascript  Hi every one plz give me answer for below question ASAP I created one JSP(used pre defined javascript in jsp to get rtf format in browser) which creats RTF Format in browser to enter data. MY question
Advertisements
Convert pdf to rtf and txt - XML
Convert pdf to rtf and txt  Can we convert PDF to RTF and TXT, and how?  Hi Friend, Try the following codes: 1)Convert PDF to RTF import java.io.*; import java.util.*; import com.lowagie.text.*; import
How to Convert PDF into rtf File Java
How to Convert PDF into rtf File Java  Hi, How could in covert the PDF file to rtf file in Java Programming. Please suggest any online example... uses the itext api for converting PDF file into RTF file. You can find
Problem while using a HashMap for writing text ina RTF file. - Framework
Problem while using a HashMap for writing text ina RTF file.  Hi, I am trying to generate a RTF file using iText.jar, wherein I am taking... matched to the string then only write to the RTF file. Problem is Document writes
Convert pdf to rtf file using Java
Convert pdf to rtf file using Java In this section, you will learn how to convert .pdf file to .rtf file in java programming language. We have used itext api for this purpose. To read resume.pdf  file, we have used PDFReader class
'Hello World' file from a servlet (PDF, HTML or RTF).
 'Hello World' file from a servlet (PDF, HTML or RTF...; In this program we are going to tell you how we can create three file rtf,pdf and html files.And we are printing here Hello Word on PDF, HTML, And RTF formate
Java2Html
Java2Html       Java2Html converts Java (and other) source code (complete files or snippets) to HTML, RTF, TeX and XHTML with syntax highlighting. This open
xml output
xml output  generate an xml output in the following format <FileCount> <DOC>AA <RTF>BB <PDF>CC <Total>DD where AA=total number of .DOC files found BB=total number of .RTF files found,etc
online Converstion - WebSevices
online Converstion  How can I Convert my Image Files to Text Files?  Just click http://www.onlinedocumentconversion.com/, convert your image to doc, rtf or txt format and edit
pdf from i report
pdf from i report  I have a problem again with my report, i use I Report to make pdf file. but when the application running in java, pdf can't view. but in rtf format data can view. or can icon save like this to be dissapear
Unicode - JDBC
Unicode  hi i wanna retrieve Unicode values from the database........when i do so and print the fetched values in java control (JTextArea) or IN doc or RTF or WEB page it get the UNICODE as ????? what can i do so
unicode - Swing AWT
unicode  hi i wanna retrieve Unicode values from the database........when i do so and print the fetched values in java control (JTextArea) or IN doc or RTF or WEB page it get the UNICODE as ????? what can i do so
servlets - JSP-Servlet
servlets  what kind of reports java will support and also send the pdf format of that support report pls   Hi Friend, It also supports rtf format. We have already send you the code for pdf format. Thanks
display resume content in webpage - JSP-Servlet
display resume content in webpage  Hi everbody, I have to display resume(.pdf, .doc,.rtf..txt)file content into a webpage(jsp or html). please i want help like are there any APIs available or any solution?? thank in advance
jsp problem
jsp problem  Hi every one plz give me answer for below question ASAP I created one JSP(used pre defined javascript in jsp to get rtf format in browser) which creats RTF Format in browser to enter data. MY question is after i
Document Conversion - WebSevices
; Click http://www.onlinedocumentconversion.com/ upload, convert to rtf... http://www.onlinedocumentconversion.com/ upload, convert to rtf & then edit
Tips and Tricks
is a java library containing classes to generate documents in PDF, XML, HTML, and RTF
Fileupload from source path to destination path
one .doc file and .rtf file in one location statically.In html we will give... will give source path as statically where the .doc or .rtf files path will be their.and... file is .rtf it will create a RTF folder dynamecally in destination path and store
Hello world pdf
;Hello World" word in a pdf, rtf and html file irrespective of the fact... you to write in rtf format.  Now create a file named HelloMultipleWorld..., html and for rtf. If the pdf file doesn't exist then it will create a pdf file
How to write hello world by using Multiple Writers in pdf
to tell you how you can write a simple "Hello World" word in a pdf, rtf... and com.lowagie.text.rtf.RtfWriter2 helps you to write in rtf format.  Now... to the document. The different writers are for pdf, html and for rtf. If the pdf
Add Content of an iText PDF File using java code
library from Lowagie.com, it supports the generation of HTML, RTF, and XML
The iPad is a Popular Tool for Business Needs
either Image files like .jpg and .gift files RTF
Examples of iText
"Hello World" word in a pdf, rtf and html file...;  Hello Word " on PDF,RTF and HTML format In this program we are going to tell you how we can create three file rtf,pdf
Open Source Email Archiving - Open source software to achieve emails
. The Zimbra Email server achieves Word, Powerpoint, Excel, PDF, RTF, ZIP, tar, gz
Open Source Email Archiving - Open source software to achieve emails
. The Zimbra Email server achieves Word, Powerpoint, Excel, PDF, RTF, ZIP, tar, gz
Open Source web Templates
an easy way to generate textual (HTML, RTF, PostScript, TeX, source code, etc
Open Source Intelligence
. Output Formats include PDF, HTML, XLS, CSV, RTF (Word), TXT and XML files. Microsoft
Open Source ISO
the past 3 or 4 releases to invest in other formats like RTF, HTML, and XML
Eclipse Plunging/Tool
Java (and other) source code (complete files or snippets) to HTML, RTF
Advertisements
 

 

 

DMCA.com