Geertjan is a DZone Zone Leader and has posted 466 posts at DZone. You can read more from them at their website. View Full User Profile

Viewing PDF Files on Mobile Phones via the NetBeans Platform

09.10.2009
| 16664 views |
  • submit to reddit
Tomáš Mann is freshly graduated from software engineering studies at the University of West Bohemia in Pilsen, Czech Republic, and currently working as a business analyst. Previously, he focused on web application development, as well as being a Sun Campus Ambassador at his university. 

In the discussion below, he highlights Jamorea Desktop, an open source NetBeans Platform application for previewing and managing PDF files and for handling their transfer to mobile devices.

What's Jamorea, in a nutshell?

Jamorea is a set of applications used for viewing PDF files on Java ME devices, mainly on cell phones. One of the applications in the set is called "Jamorea Desktop":

Jamorea Desktop is used for the conversion of PDF files for mobile viewing. And it is based on the NetBeans Platform, while supporting conversion, previewing, and file transfer via Bluetooth.

What's the technology behind Jamorea Desktop?

The main purpose of "Jamorea Desktop" is conversion of PDF files to a form suitable for viewing with Java ME applications via Jamorea Micro. I chose Apache PDFBox library to facilitate conversion because it provides useful PDF manipulation features. Custom conversion functionality such as converting font types, color space of images, and so on, is performed using this library. The result of the conversion process is a valid PDF file that can be read not only using Jamorea Micro but also, with a possible minor decrease in quality, using regular PDF viewers.

When you have a converted file you want to, obviously, in this case, transfer it to your mobile device. Today two main ways exist: you can use direct access to the memory card of your phone via USB or you can use Bluetooth. The NetBeans Platform can help you with the first task out of the box: I've used the Favorites window in NetBeans IDE to work with the file system. And there is an easy way to use Bluetooth too. This approach is provided by Bluecove, which is a Java library for Bluetooth. Bluecove offers many features, one of which is OBEX file transport. Jamorea Desktop can discover the mobile device and enables transfer by simply drag & dropping the file, using common Java platform functionality.

How does Jamorea compare to similar products? What are its distinguishing features?

There are cell phones featuring proprietary embedded PDF viewers, there are PDF viewers for smart-phones, but there is a lack of such software for more low-end, yet Java ME enabled devices. As far as I'm aware, there's only Jamorea in this space.

Jamorea can display, at least, after conversion, various PDF files with text, tables, and graphics. It is suitable for reading general documents or eBooks. It runs on every CLDC 1.0/MIDP 2.0 compliant device with at least 1MB RAM.

And, of course, it is open source software!

You wrote your university thesis about this. How did that go?

The aim of my thesis was to perform research regarding the problem of viewing PDF documents on Java ME devices and to design and implement a basic solution for the given problem.

The task included reading through 1000+ page PDF format specification and producing a short introduction as a part of the thesis text... and implementing what is today Jamorea. I worked on the thesis for about 6 months, but not full-time, since there were classes I had to take and other university projects. I successfully defended it and gained my academic degree in June 2009.

You used the NetBeans Platform in this project, why?

The focus of my thesis was Java ME application and the PDF file format. I needed something to ease the task of creating the desktop application used for the preview and conversion of documents. Particularly, I did not want to bother with connecting JButtons, JLabels, layouts, menus, commands, and listeners etc. The NetBeans Platform includes many common GUI components one can use and I could get professionally looking application in almost no time at all. Those parts I had to design myself were easily created using the GUI builder in NetBeans IDE.

I also like the idea of modularity. Below you see the modular structure of the application, together with the Java ME library being created in NetBeans IDE.

Thanks to modularity, I was able to develop the previewer without needing to think about how it would affect the code relating to file transfer using Bluetooth, which was only an idea at that stage of the preview module development.

What are the top 3 benefits you gained from the NetBeans Platform?

  1. Modularity. Adding a feature is very easy when it is implemented as a module.
  2. The professional look of the application and the set of available standard components. 
  3. The multiplatformness of the framework. Suddendly my desktop application supports Windows, Linux, Solaris, and Mac! 

How did you get started using the NetBeans Platform?

I went through the tutorials from platform.netbeans.org, the great video series called Top 10 NetBeans APIs, and the book "Rich Client Programming: Plugging into the NetBeans Platform".

I tried to write some smaller applications and then, via trial-and-error, began to focus on the thesis related work, usually spending half of the time reading the platform documentation and... your blog. :-)

What was it like to learn how to use the NetBeans Platform? Do you have any tips?

At the beginning I had to get used to terminology, such as "TopComponent". I also had to become familiar with the concept of modularity. But then learning became fun. I really suggest developers starting with the NetBeans Platform to go through the aforementioned video series and to use it to code by example, i.e., try to implement the examples in the screencast series.

What are one or two things that surprised you about the NetBeans Platform after you started using it?

I was surprised by the modular design and the whole concept of modular applications. I wa surprised at how easily they can be implemented via the NetBeans Plaftorm. It saved me many late nights of before-the-screen hours! 

What's the future of Jamorea? Do you need more developers working on it? How to get started?

Here's the result right now, on the side of the mobile phone:

I hope to find some new developers to continue work on the project. There is room for improvement in performance and also the PDF support can be broadened to include support for more font types, color spaces, and more.

The easiest way to get started is to go to the official website:

https://jamorea.dev.java.net/

Check-out the source files and start hacking away! And/or to send me an email to tomas DOT mann AT email DOT cz to discuss problems and share thoughts.

 

AttachmentSize
components.png19.21 KB
desktop.jpg42.07 KB
micro.jpg24.34 KB
development.jpg46.01 KB
photo.jpg9.93 KB
Published at DZone with permission of its author, Geertjan Wielenga.

Comments

Bryan Low replied on Fri, 2013/02/01 - 10:33pm

Twin Fountains EC facilities provide full family entertainment needs for your family and loved ones. Indulge in a serene and tranquil lifestyle right in the heart of Woodlands.

Woodlands EC 

Bryan Low replied on Sun, 2013/02/24 - 4:44am

Bartley Ridge is a new and upcoming condominium located in the Bartley Mount Vernon area, right next to Bartley MRT. It is within a short drive to Little India, Orchard and city area. With expected completion in mid 2016, Bartley Ridge comprises of TBA towers with TBA units and stands TBA storeys tall. Future residents will be able to walk to the existing Bartley MRT in the Circle Line. With such a short drive to the city area as well as the orchard and bugis area, entertainment for your love ones and family will come at a stone’s throw away.

Bartley Ridge

Bryan Low replied on Thu, 2013/03/07 - 10:10pm

Hillview Peak facilities provide full family entertainment needs for your family and loved ones. Indulge in a serene and tranquil lifestyle right in the heart of Hillview.Several buses are available near Hillview Peak along with shopping centers and restaurants.

Hillview Condo


At Ppty replied on Mon, 2013/05/06 - 12:45am

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.

Corals at Keppel Bay

Jurongwestcondo... replied on Tue, 2013/10/08 - 10:58pm

Also, it is right beside Jurong Stadium as well as the Jurong Archery Club. Entertainment for your loved ones and friends are therefore at your fingertips with the full condo facilities as well as the amenities near Jurong West Condo. Jurong West Condo by mcl land

The Hillford Th... replied on Wed, 2013/10/09 - 9:18pm

Future residents will be able to walk from Jalan Jurong Kechil Condo to the upcoming Downtown Line Beauty World MRT. Also, nature awaits your family and friends at the nearby Dairy Farm Nature Park and the Bukit Batok Nature Park. Also, the ultimate nature awaits you at Bukit Timah Nature Reserve. the hillford location

Aman Verma replied on Sun, 2014/08/31 - 7:56am

 Thanks..

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.