Persian Text Publishing: JavAneh Applet

Using JavAneh Applet you can publish anything on the Web in Persian.

Web Users.
  • As a user, the only thing you need is a Java enabled Web browser such as Netscape 2.x (all platforms except Windows 3.1, Netscape 3.x in case of MAC), HotJava or Internet Explorer 3.x.
  • When you load the applet, it automatically spawns an external window on your display to show Persian text, etc. In this way it doesn't jam your screen and even if you have a slow link, you just load JavAneh and continue surfing. Then come back later again to JavAneh window and read the contents.
  • You don't need to install any new software.
  • It doesn't occupy your hard disk.
  • No other plug-in or external viewer is necessary.
  • You don't need to be worried about the platform that you are using and if an external viewer for this platform is available.
  • You can load the applet once and read it whenever you wish.
  • You don't need to pay for commercial or shareware viewers.
  • In other words JavAneh is FREE.
Web Developers.
  • As a Web developer you can typeset Persian documents, articles, magazines, etc., using your favorite wordprocessor or even scan them and use JavAneh Applet to deliver them to your customers.
  • JavAneh best suits displaying books, magazines and long articles composed of many pages, where the user can walk through the pages conveniently.
  • You can also add sponsors and other messages to the main text or display them in the status bars.
  • Once you prepare your document, you don't need to be worried about which platform your customers are using and if an external viewer for that platform is available or not.
  • Your documents have better protection(!!) against cut, paste and illegal copy because they are displayed in an applet window rather than the browser window.
  • Once your customer loads your document, it will be run locally using local resources rather than travelling back and forth to your server to fetch the documents. This means less burden on your server and better service.
JavAneh at work.
Is JavAneh free? As far as Web users are concerned it is free. If you want to browse pages you can just do it. All you need a Java enabled browser. You should ask Web developers to provide information using JavAneh. It is free for academic Web developers and noncommercial institutions. Commercial web developers may want to contribute to the Online Library of Persian Art and Literature.

How can I get JavAneh? If you are a Web user you don't need to get or install anything.
If you are a university or individual Web developer and want to add Persian pages to your WWW service you should get JavAneh package. If you are a commercial Web developer you may want to contact the author before getting JavAneh package. In either case JavAneh can be downloaded freely. The newest version of JavAneh code including class library and installation guide can be obtained from JavAneh home page:
JavAneh.tar.gz (tar+gzip format, 53K.)
JavAneh.zip (zip format, 58K.)

Notes. Note that JavAneh is a beta version software. It may still undergo changes. I've tested it on SunOS 4.1, Sparc Solaris 2.4 and 2.5, X86 Solaris 2.4 and 2.5, Windows 95 and NT platforms using Netscape 2.x, 3.x, and JDK 1.02.

Please contact me for more information and let me know if you have suggestions or comments.

Copyright Terms. USING AND COPYING THIS PACKAGE IS PERMITTED CONDITIONALLY FOR EDUCATIONAL AND PERSONAL PURPOSES, PROVIDED THAT THE AUTHOR AND COPYRIGHT TAGS ARE KEPT UNCHANGED. USING THIS PACKAGE IN A COMMERCIAL PRODUCT OR A COMMERCIAL SERVICE, IS NOT COVERED BY THIS LICENSE. THIS SOFTWARE IS MADE AVAILABLE AS IT IS, WITH NO WARRANTY ABOUT THE SOFTWARE ITSELF OR ITS PERFORMANCE OR ITS CONFORMITY TO ANY SPECIFICATION. PLEASE CONTACT THE AUTHOR FOR ANY QUESTIONS.


JavAneh FAQ

1. What is this "Untrusted Java Applet Window" message appearing on my screen? Java language is quite restrict on security. It is a warning message only. Whenever a Java applet tries to get a hold on your window system and draw a new window, etc., this warning appears. If you are very concerned with security disable Java on your system. Well then you don't get the applet anymore.
2. What make JavAneh different from other applets displaying Persian out there? Release note says that when you load the applet, it automatically spawns an external window on your display to show the page, etc. In this way it doesn't jam your screen and even if you have a slow link, you just load JavAneh and continue surfing. Then come back later again to JavAneh window and read the contents. At this moment, no other applet can do so. In case of Windows 95, NT and Unix, you can have multiple JavAneh windows at the same time on your screen. No other applet can offer this feature.
3. Does JavAneh actually display Persian? What font it uses? No applet at this moment can display Persian font. Am I right? Although SUN says that Java supports unicode and Netscape says that it's browser supports unicode on the UNIX and Macintosh platforms but there is no library in JDK-1.02 available to display foreign fonts yet. In principle, it seems to be possible to develop a library for displaying any symbol, even Persian characters. Has anybody worked on this? I don't know. At this moment JavAneh just takes an image of the text, in gif, jpeg or postscript and displays it, quite simple and handy. Is that all? Yes, that is all. Even this was not available before.
4. I'm a Web developer and want to use JavAneh to publish my works. I've already got JavAneh code. How can I install JavAneh? Suppose that your home directory is /home/you and you have
/home/you/public_html directory for your html files and
/home/you/public_html/java directory for Java related files and
/home/you/public_html/java/classes directory for Java class files.

  1. untar (or unzip) the code and put the classes file in your /home/you/public_html/java/classes directory:

    % gzip -d JavAneh.tar.gz | tar xvf -
    or
    % unzip JavAneh.zip
    % mkdir /home/you/public_html/java/classes/JavAneh
    % mv classes/*.class /home/you/public_html/java/classes/JavAneh/.
    % mv javaneh-title.gif /home/you/public_html/java/.

  2. Prepare pages that you want to display and put them in your /home/you/public_html/java directory. Please see the next question for more details.
  3. Prepare a file called format.txt. A sample file is given here. Put it in your /home/you/public_html/java directory.
  4. Write HTML page to display the applet. A sample file is given here. Note that you should fix the path for CODEBASE and FORMAT if you use other directories for them.
    Also be sure to to fix the PAGES parameters to refer to the number of pages you are going to display. This number should include the title page that defaults to "javaneh-title.gif". You are kindly asked to use this page as the title page of your work.
    Better adjust FRAMEWIDTH and FRAMEHEIGHT, the size of external window to the size of the biggest page in order to have less distorsion when displaying your work.
  5. In order to let other Web develpers have access and use JavAneh easily, you are kindly asked to get javaneh-icon.gif icon and put a link like this in your page:

    <A HREF="http://www.enel.ucalgary.ca/People/far/javaneh.html"> <IMG SRC="javaneh-icon.gif"></A>

  6. If you get a message such as Broken protocol directive on your screen, then there is something wring with your format.txt file. Perhaps you've assigned wrong number of PAGES.
  7. That is all for the moment!!
5. How can I prepare Persian Pages? First, you need a proper editor and a utility to convert the results to postscript, gif or jpeg format. Gif is the best because of compactness (for images with less than 64 color gif gives better commpressin than jpeg. This is reversed, however, for images with more colors. ) There are many shareware and commercial wordprocessors. Most of them cannot output to postscript or gif. I use the excellent ArabTeX package. ArabTeX can be obtained from here. If you are familiar with LaTeX, you can use ArabTeX easily. First I prepare a foo.tex file using any wordprocessor, such as emacs, vi, etc. After TeXing it I get a foo.dvi file. I convert foo.dvi to postscript using dvips utility:

% dvips -D 600 foo.dvi -o foo.ps

This produces a multi-page postscript foo.ps file. Then I use the convert utility that comes with ImageMagick to get separate pages and write them to gif format, simultaneously. ImageMagick can be obtained in binary and source code from here.

% convert +adjoin foo.ps gif:page.gif

This make a series of gif pages named page.gif.0, page.gif.1, etc. you can further cut the images to proper size if you wish.

6. What does JavAneh mean? JavAneh in Persian means seedling or bud.
7. I don't have a Java enabled browser. What should I do to see JavAneh? First try to get a browser that displays Java. If it is impossible, try appletviewer that comes with SUN's Java Developers' Kit (JDK). Using appletviewer and pointing it to the URL of the applet, you can see the applet.
8. How to enable Java on my browser? On Netscape 2.x select "Options" and "Security Preferences" and "General" and check that "Disable Java" IS NOT selected. That is it. Note that in case of using Netscape, Java support is enabled by default.
On Netscape 3.x select "Options", "Network Preferences" and "Languages" and then select "Enable Java" and push "OK". That is it. Note that in case of using Netscape, Java support is enabled by default.
9. How to enable Java on my MAC? I don't use MAC. Netscape says that Java support has been added to the Macintosh Power PC and 68K platforms allowing users to run Java applets. (Netscape 3.x certainly does. In case ofMAC platforms, Netscape 2.x supports Java Scripts only? Am I right? Can anyone be more specific on this?). Therefore the procedure will be the same as in the previous question. If having problem with Netscape 2.x, try 3.x. It should work.
10. How can I report a problem? Please give me feedback on what other features you want to be added and if you find problem please give me a note. Please be specific with the case itself and information on the browser and platform that you are using will be quite helpful.
11. What are future plans for JavAneh? Tie it with a Java based text editor is on the card. I mean you use your Web browser to edit Persian text! Then it will be automatically converted to appropriate format to be displayed by JavAneh and postscript or PDF format for printing.
12. What is Online Library of Persian Art and Literature? I've a dream of having a world wide and freely accessible Online Library of Persian Art and Literature including classics and contemporary poetry, fine arts, etc., all in Persian. Why not leaving those treasures on-line for our children to read and enjoy? Why not telling our kids where did we come from and how our ancestors contributed to the human culture? Is there anyone else feeling the same? If so, we should work together. I've already taken the first steps and seek help from all of you on volunteer basis.
13. How can I contribute to this Online Library of Persian Art and Literature? There are many things to do. We should collect first Persian books. Then we should typeset them to put on-line. We need hardware to support this, I mean actual Web server, disk, etc., and of course software, such as JavAneh. You can contribute in any way that you want. I'm now collecting Persian books for this library, and if you wish, you may send me books or typeset them. Please do contact me for more details.


This page was created by Dr. B.H. Far.
Please contact far@enel.ucalgary.ca
for any suggestions or comments.