What Is MjBook
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 o Full support of Unicode letters(except Arabic) on any phone o Limited support of right to left languages (Hebrew is fully supported) o Full screen mode on Nokia phones and phones with Java MIDP2.0 o Two layout modes portrait and landscape o Adjustable font, links and background colors, background picture, char and line spacing. o Up to 3 embedded fonts show any national letters (except Arabic) on any phone o Up to 12 phone fonts for portrait layout o Word wrap on / off o Current position indicator o Smooth screen scrolling like in iPhone/iPad Picture displaying o PNG, JPG, GIF and BMP file formats are supported o Picture rotate is available on phones with java MIDP2.0 o Full screen image preview Backlight control (for Nokia series 40 only) o Backlight on /off o Light level control o 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. o Adjustable auto scrolling lists forward with specified interval Text search o Full Unicode letters support for search o Search from the first page or from current page o Search with match case or not Password protection o All the text in midlet is encrypted o 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
o o o o
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 o Create a new text file using Notepad (this is a MS Windows component, you dont need to install it). Copy & paste example below then save text as c:\mjbook\book2.txt file in UNICODE format.
o o o
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>
o
o o
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 dont 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 o Run the program c:\mjbook\mjbookmaker.exe -make book2.cfg o Midlet (book2.jar and book2.jad files) will be in c:\mjbook\midlets folder Running mjbook o Install the midlet on mobile phone o 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
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 Melissas link
and press key Fire the program shows content of Melissas 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,
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
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
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 (Espaol) 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 Full screen preview of image (image is shown truncated in text) 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 <#link http www.getjar.com > a site with free java games <#/link> <#link sms +10000000001:I am busy now > busy <#/link> <#link phone +10000000001 > my office phone <#/link> <#link file e:/music/myfavoritesong.mp3 > My Favorite Song <#/link> Action (if user clicks on link) Phone browser will be started and navigated to URL www.getjar.com Phone will send SMS message with text "I am busy now" to specified number +10000000001 (E164 format) Phone will dial specified number +10000000001 (E164 format) 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 dont provide access to files system etc.
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 cant 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 cant resolve the issue you may send source, configuration and log files to me for investigation
5.0.5
+ Touch screen phones support + Batch mode (makeall) + Fiction Book (.fb2 files)
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