Please choose a menu option
Visit the IDRsolutions WebSite

RSS feed? News:

09 Sep 11 Version 4.52 build 88 released Improvements to 3D Coverflow Mode, second release of PDF2HTML5 code base. More...

30 Jun 11 Version 4.50 build 58 released Rewrite of low level parser to improve speed and robustness. Read More...

06 Jun 11 *NEW* PDF to HTML5 conversion We have released our new PDF to HTML5 converter beta for public feedback. Read More ...

12 May 11 *NEW* Daily builds Customers can now download our daily JPedal builds for testing our latest code version. Try it ...

25 Mar 11 JAI to JPEG2000 memory leak fix We discovered a bug (and fixed it)in Sun's JAI libraries. Update your version now. More...

JavaME PDF reader - Quick start

This simple tutorial shows you how to use JavaME to view a PDF in the Netbeans phone emulator.

 

How to add a JavaME PDF viewer to your code

If you have followed the previous tutorials to set up a Netbeans project and have checked the correct jars are on your classpath it is really simple to start using the viewer.

Firstly your need a PDF file to look at. Put it in the directory on your hardrive that represents the emulated phones filesystem (Theres an example PDF you can use here).

The filesystem is in c:\Users\<UserName>\javame-sdk\3.0\work\10 on my machine, but you can check yours by simply putting the follow line of code in the main method and clicking run:

System.out.println(System.getProperty("user.dir"));

The Netbeans output window will show the path to the phones filesystem and you should put the PDFs you want to view in there.

Find the emulator path

Now all you have to do is make an instance of the MEViewer object and call its init method with the PDF you want to see. Just replace the contents of the main method with these 2 lines:

MEViewer viewer = new MEViewer();

viewer.init("JPedal.pdf");

Click on the lightbulb to add the import from:

import org.jpedal.examples.meviewer.MEViewer

Press run and there you go, a JavaME PDF viewer that you can put into your own code.

View a pdf with ME

Feedback, questions and updates

There is a support forum for questions, or you can contact IDRsolutions via our contact page.

There is an RSS feed with regular updates about our products. We recommend you subscribe so we can keep you updated.

Please let us know if you find any bugs with the bug report form.

 

Return to main PDF support section

Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library

 


PDF viewer