Free java games, rss and book readers for mobile phones Nokia, Siemens, Samsung, SonyEricsson, Motorola. Mazes. Puzzles. Logical Games. Crosswords. Sudoku.

mjBookMaker 5.0.7







What is mjBook ?

mjBook is a electronic book (eBook) for mobile phones. It is a midlet which allows reading MS Word documents, FB2 and plain text files on any java – enabled phone using any MS Windows font. This is the easiest way to read your favorite book when you waste your time in a queue or traffic jam. mjBook also allows to store in your mobile phone a lot of useful text and graphics information: time tables, hand books, diagrams, charts, plans etc. mjBookMaker can create java books from MS Word files (.doc), Fiction Books (.fb2 files) and simple text files (.txt) in UNICODE, UTF8 and ANSI encodings.
mjBook is very helpful when phones can't display national symbols. Here is good example of customized mjBook engine usage (ebooks on Tamil).

Features

  • Compatibility with any PDA / mobile phone with java. The same mjBook midlet will work in the same way on any phone.
  • Phone capabilities auto detection allows to use advantages of Java MIDP2.0 and Nokia phones.
  • Full screen mode on touch screen phones
  • A new parallel rendering engine – when you are reading current page the program renders next one into memory. When you go to next page it will be shown instantly.
  • Hyperlinks – allows to navigate into book and make an interactive book with can make a call, send SMS or start browser for Internet access. Hyperlink can point fo any file in phone file system but action depends on phone vendor.
  • Quick access to everything setting by single key.
  • Text displaying
    • Full support of Unicode letters(except Arabic) on any phone
    • Limited support of right to left languages (Hebrew is fully supported)
    • Full screen mode on Nokia phones and phones with Java MIDP2.0
    • Two layout modes – portrait and landscape
    • Adjustable font, links and background colors, background picture, char and line spacing.
    • Up to 3 embedded fonts show any national letters (except Arabic) on any phone
    • Up to 12 phone fonts for portrait layout
    • Word wrap on / off
    • Current position indicator
    • Smooth screen scrolling like in iPhone/iPad
  • Picture displaying
    • PNG, JPG, GIF and BMP file formats are supported
    • Picture rotate is available on phones with java MIDP2.0
    • Full screen image preview
  • Backlight control (for Nokia series 40 only)
    • Backlight on /off
    • Light level control
    • Light delay control
  • Book navigation
    • Table of content, navigation to specified chapter/section
    • Quick jump to the first page, to the last page, to next and prior pages.
    • Jump to specified page.
    • Up to 5 book marks, you can save a book mark or jump to a page from book mark.
    • Adjustable auto scrolling lists forward with specified interval
  • Text search
    • Full Unicode letters support for search
    • Search from the first page or from current page
    • Search with match case or not
  • Password protection
    • All the text in midlet is encrypted
    • Password for text reading can be asked once or each time
  • Current date and time display.
  • Statistics and book info display.
  • Custom picture in a splash screen
  • All settings are stored into flash memory and can be changed “on fly”.
  • Program menu, titles, controls and other elements can be customized for any language

How can I create a mjBook ?

Example #1 - private secure phonebook with photos. That phonebook can be opened by owner only while other people (wife or girlfriend) have access to that phone. This is a step by step instruction.

  • Setup
    • Download free mjBookMaker 5.0.6
    • Unpack the archive into folder c:\mjbook
    • mjBookMaker does not require installation and now ready to run
  • Preparing source files
    • Create a new text file using Notepad (this is a MS Windows component, you don’t need to install it). Copy & paste example below then save text as c:\mjbook\book2.txt file in UNICODE format.

      My friends
      <#header 1>Jennifer<#/header>
      <#image jennifer.png>
      Make a call to <#link phone +10000000001>mobile phone<#/link>, <#link phone +10000000002>office phone<#/link>

      <#header 1>Melissa<#/header>
      <#image melissa.png>
      Make a call to <#link phone +10000000003>mobile phone<#/link>, <#link phone +10000000004>office phone<#/link>

      <#header 1>Michelle<#/header>
      <#image michelle.png>
      Make a call to <#link phone +10000000005>mobile phone<#/link>, <#link phone +10000000006>office phone<#/link>
    • Preparing photos. Resize photos (usually large JPG files) to size suitable for mobile phones (128*128 for example). You can use Paint – it is a MS Windows component and you don’t need to install it. Save photos in PNG format. You should have following files: c:\mjbook\jennifer.png, c:\mjbook\melissa.png, c:\mjbook\michelle.png Yo can download smiles here.
    • Creating configuration file. Run program as shown below to obtain template of configuration file: c:\mjbook>mjbookmaker.exe -config book2.cfg
    • Open new configuration file c:\mjbook\book2.cfg by Notepad and modify parameters listed below and save the file in UNICODE format
      BookName=book2
      BookInfo=my friends
      TextFileName=book2.txt
      PasswordMode=2
      Password=1234
      FontSize1=10
      FontName1=Arial
      TagsEn=true
      SplashTimeout=1
      ImageMode=1
  • Making midlet
    • Run the program c:\mjbook>mjbookmaker.exe -make book2.cfg
    • Midlet (book2.jar and book2.jad files) will be in c:\mjbook\midlets folder
  • Running mjbook
    • Install the midlet on mobile phone
    • Launch the program and you will see splash screen with mjsoft logo. Password window appears after splash screen. If password is wrong the program exists and you have to launch it again.

    • If password is correct we see the first page of the book – it is table of content. mjBookMaker builds table of content basing on header tags.

    • Each item in table of content is hyperlink to related piece of text into the book. Move pointer (cursor keys Left / Right) to Melissa’s link

    • and press key Fire – the program shows content of Melissa’s chapter

    • Move pointer (cursor keys Left / Right) to mobile phone link and press key Fire again – the program will make a call to specified phone number. Important: phone always asks for permission before any actions outside the phone (call, SMS, Internet / WAP).

If I need a lot of mjBooks. Batch mode

Let us imagine that you have large library - a lot of ebooks in fb2 format (Fiction Book files) and would like to convert them to mjBooks to read on phone.

  • Download the program
  • Prepare one configuration file as shown above. For batch mode you should set search filter (like *.fb2 etc) for TextFileName.
    TextFileName=c:\mylibrary\*.fb2
  • Run the program using new configuration file
    c:\mjbook>mjbookmaker.exe -makeall mybooks.cfg
  • The program will scan c:\mylibrary\ folder and convert all .fb2 files into mjBooks.

Notes:
  • Book name is built from source file name in batch mode. For example you will have okudzhava_bulat_prelestnye_priklyucheniya.jad and okudzhava_bulat_prelestnye_priklyucheniya.jar file in folder c:\mjbook\midltes from okudzhava_bulat_prelestnye_priklyucheniya.fb2 source file.
  • If source Fiction Book file contains cover page image (tag <coverpage>) it will be used as splash screen image
  • Book and author information are extracted from tags <book-title> и <author>
  • mjBook will also have all images included into source .fb2 file

Copyright information in mjBook

By default configuration file contains mjsoft copyright information and it is better to set your own one. Here is list of elements to be changed:

  • Midlet details (shown at midlet installation)
    MidletVendor=mjSoft
    MidletInfoUrl=www.mjsoft.info
    MidletDescription=demo book
  • Splash screen (shown on every java book startup).
    20=mjBook 5.0
    21=www.mjsoft.info
  • Main menu (About and Book Info menu item)
    813=my test book
    903=mjsoft
    905=www.mjsoft.info

Customize your books

Move forward and paint our book – add your own fonts, colors, pictures for background, splash screen, pointer and icon.
I recommend you to specify at least 2 color schemes - for ordinary and inverted colors as shown below:
BackColor1=$FFFFFF
FontColor1=$000000
LinkColor1=$0000FF
BackColor2=$000000
FontColor2=$FFFFFF
LinkColor3=$0000FF

The first color scheme shows black letters on white paper the second scheme - white letters on black paper. Hyper links are shown in red in both cases. Color (in RGB) may be set as decimal or hex format. $ is required for hex values.

Need a custom version for your language?
No problem – just edit configuration file and translate menu items. Here are example of Russian and Spanish localization.
English version Russian (Русский) version Spanish (Español) version
#Soft keys commands
#
#1100:
1100=Cancel
#
#1101:
1101=Apply
#
#1102:
1102=GoTo
#
#1103:
1103=Select
#Soft keys commands
#
#1100:
1100=Отменить
#
#1101:
1101=Применить
#
#1102:
1102=Перейти
#
#1103:
1103=Выбрать
#Texto de las teclas de comandos.
#
#1100:
1100=Cancelar
#
#1101:
1101=Aplicar
#
#1102:
1102=Ir
#
#1103:
1103=Seleccionar


Here are localized configuration files: English (by mjsoft), Russian (by mjsoft), Spanish (by Adrian Mendoza Cea), Polish (by PPPC). Spanish (by Ron),

Image processing

If you make a book wit pictures you should be aware that phones have small screen sizes:

  • Old phones 128*128, 128*160 and old smart phones 176*220
  • Most of modern phones, smart phones and PDA 240*320
  • Touch screen phones 360*640 and above
If image is large than screen size the program will show only part of it in text. An image in book is link to itself. That link activates full screen preview of the image without text. You can use cursor keys to move images in preview screen.
Images displayed in text (big image truncated in text) Full screen preview of image (image is shown without text)

Large images increase size of java book significantly and old phones will not install large midlets. According java specification only PNG files are allowed for java programs for mobile phones but most of modern phones support JPG as well. PNG is lossless format and it has better compression for schemes, diagram and other pictures which has limited set of colors (black and white for example). JPG has better compression for photographs etc. Thus there is no definitive answer which format is better. The program offers following choice for image processing:
  • 0 Do not import images – output book will hot have any images
  • 1 Import images as is (do not use ImageMagic). You should care about size of images.
  • 2 Import, resize, convert and choose smallest (PNG or JPEG) using ImageMagic. That method will reduce output book size but JPG images may not be shown by old phones
  • 3 Import, resize and convert to PNG using ImageMagic. That method will make a book which is 100% compatible with all phones. But output book size may be quite big.
  • 4 Import, resize and convert to JPEG using ImageMagic. In that case we may get less size than in method 3 but we definitely get low compatibility with old phones.
If you make books for your own phone only you should create a test book with JPG images to verify if your phone supports them and select method 2. For public books I recommend method 3 – it provides the most compatibility.
mjBookMaker uses a free tool (Image Magick) for image processing. If you are going to make books using methods 2, 3 or 4 you have to install ImageMagick. Important: at ImageMagick installation you must set check box to register ImageMagick as COM object.
Next important step is definition of ImageMagick rules for image resize. By default the program offers following rules:
ImagePngOptions=-resize 160x128> -depth 8
ImageJpgOptions=-resize 160x128> -quality 100 -depth 8

ImageMagick will resize source images as shown below using default rule:
Size of source images Size of output images (will be added to book)
1000*1000 128*128
640*480 160*120
200*100 160*80
128*128 128*128
64*64 64*64

As you can see source image is resized if its width or height exceeds limit defined in rule. Please visit www.imagemagick.org and learn more about that powerful software.

Hyperlinks

Link tag consists of 2 parts: the first part describes action to be performed if user clicks on link and the second in text shown to the user.
The program recognizes following link types to external resources:
Code example Action (if user clicks on link)
<#link http www.getjar.com > a site with free java games <#/link> Phone browser will be started and navigated to URL www.getjar.com
<#link sms +10000000001:I am busy now > busy <#/link> Phone will send SMS message with text "I am busy now" to specified number +10000000001 (E164 format)
<#link phone +10000000001 > my office phone <#/link> Phone will dial specified number +10000000001 (E164 format)
<#link file e:/music/myfavoritesong.mp3 > My Favorite Song <#/link> Phone will start media player and play "myfavoritesong.mp3" file stored on SD card in "music" folder (verified on Nokia E51 phone). That link can point to any local file stored in phone file system. But action depends on particular phone implementation – some phones don’t provide access to files system etc.

Touch screen phones support

Versions 5.0.4 and above properly work on touch screen phones in full screen mode. Here are screen shots from Nokia 5800/5530 for the same java book.
Compatibility mode
with on-screen keyboard
Full screen mode
without on-screen keyboard
The program shows its own menu in full screen mode. Menu contains 4 buttons:

  • M - Menu button
  • F - Button for font change
  • Up - Previous page
  • Down - Next page
Hyperlinks and buttons are activated by single touch. If phone is rotated before java book start the program adjusts itself for new configuration:
Vertical

Horizontal
Anyway the program is able to rotate text and change font on fly:

Troubleshooting

If you can’t make a book due to some software errors you should enable debug tracing for mjBookMaker (set DebugLevel to 7).
DebugLevel=7

Run the program with modified configuration file as shown below to redirect printout to log file (problem.log for example):
c:\mjbook>mjbookmaker.exe -makeall mybooks.cfg > problem.log
If you can’t resolve the issue you may send source, configuration and log files to me for investigation

Versions and changes

Version Fixed Added
5.0.8 (beta) - + Smooth screen scrolling like in iPhone/iPad
5.0.7 - A bug in FB2 parser + New link type which points to a file in phone file system (mp3 file, html etc)
5.0.6   + Extended settings for line and char spacing
5.0.5 - A bug (empty item) in main menu
- Bug in text split code (multipart options does not work)
- Bug in Find menu (Cancelled is shown instead of No Found)
- Missed spaces in About, Date Time and Book Info forms
+ Cursor keys are changed in landscape (rotated) mode
5.0.4 - A bug in Display options menu + Touch screen phones support
5.0.3 - A bug with custom midlet attributes in jad file
+ Batch mode (makeall)
+ Fiction Book (.fb2 files)
5.0.2 - Wrong color scheme

Translators needed

I would like to make more localized versions (Portuguese, Chinese etc) of mjBook & mjBookMaker and need some help from native speakers. If you want to join the project as volunteer please send me an email at for details.

Many many thanks to people who translated mjBookMaker files:

  • Spanish version - Adrian Mendoza Cea
  • Polish version - PPPC
  • Bulgarian version - Ron
  • Portuguese version - Felipe Aguiar

GUI tools for mjBookMaker 5.x

mjBookMaker 5.x is a console application which requires configuration file to work. Adrian Mendoza Cea provided free Windows application (with GUI) which helps to create configuration file for mjbookmaker (step by step wizard). It is available in Spanish and English. Please nothe that it is not my own software and so send all questions and wishes direct to its author Adrian Mendoza Cea



Send wishes, remarks, bugreports or suggestions to author