Smart JEditor - Your RTF editing and conversion software
100% Java word processing component for editing RTF (Rich Text Format) documents. Add Smart JEditor power to your Java application by allowing your users to communicate using Rich Text Style (RTF). Let you and your user silently print and PDF convert exiting RTF documents. Edit remote RTF documents using the JEditor provided UI and save the same to a remote location through a server such as a web server, or save it locally in user machine. Smart JEditor thin client lets your edit Rich Text Format (RTF) files using a browser client application such as an Applet or a command line Java application. Being a thin client, Smart JEditor gets downloaded into client machine almost instantly, reads the remote RTF and shows it into the editor window promptly. User can edit the RTF and save it remotely, locally, print, PDF generate and more. Smart JEditor lets you customize its UI and other server deployment features to fit with your requirement.Server deployment
There is a demo program and its batch file SilentPrintPDFDemo.bat and SilentPrintPDFDemo.sh for silently print and PDF generate RTF files from a server environment. Feel free to copy and edit the code in the SilentPrintPDFDemo.java sample file located in the downloaded archive under "src" directory.
Web based editing (editing remote RTF's) using a Servlet
As a sample web based RTF editing from a browser window the downloaded Smart JEditor archive contains a WAR file ready to be deployed in a web server. Following are helps and tips for deploying the Web based RTF editing for browser based applications.
This web example has one JSP file index.jsp. Copy this .WAR file into the "webapps" directoy (for example in a Tomcat server) or any other directory appropriate and restart the web server. Access the starting page (index.jsp) typing the web url (e.g. http://host:port/smartjeditor_webdemo/). When you click the Click here to start link on the start page, it invokes a servlet that is configured in the web.xml file located under WEB-INF/ directory. This servlet is responsible for (i) bringing the Applet to the browser, (ii) reading and sending the RTF byte[] from the remote RTF source, and (iii) save the edited RTF byte[] to the remote location. There are few sample RTF files made available under the original_rtf directory. When you click on the 'Start" link, a new page will be displayed that is the list of RTF files in this directory ready for edit once user click on them.
The program that actually brings these RTF files all the way to the browser for its viewing and editing is an applet. In order to edit/view an RTF document, click on any RTF file name.
The source code for the servlet and also the applet programs are located under the "src" directory under the WAR archive. Feel free to edit them for customization and redeploy it. For example, your RTF source files might be located in a different directory or in a database. Therefore, chane the Servlet program under "src" directory and redeploy the .class file under WEB-INF/classes/. Each time you redeploy the Servlet class files, make sure to restart the web server. File index.jsp is located at the root of this WAR application and is invoked by default (because it is configured in the web.xml file to do so).
Thing that you must doYou must sign the jar files used by the demo applet made available under the root of the WAR file. Replace these jar files with the signed jars of yours. This is because, these are demo jar files provided by Activetre, Inc. and it might have expired the demo period.
Client deployment
In the downloaded archive it has a readymade applet sample for deploying in a web browser for locading and saving RTF files local to the client machine (NoFrameJEditorApplet.html). There are few other batch files for silent printing (without showing any GUI) and running the RTF editor (shows GUI) from command line.
Smart JEditor GUI menu options
File Edit Format Insert Help New Open Save Save As Close Undo Redo Cut Copy Paste Find Find and Replace Select All PDF Generate Preview Font Family Font size Font color Bold Italic Underline Picture Page number General help for all the menu options.