tags:

views:

410

answers:

2

There is a pdf file in a web server. Accessible from, let's say:

http://domain-name/files/test.pdf

Is there a way to call a function to open this pdf file from the default pdf browser (if exists) of the mobile device?

Thanks in advance.

Note: I am not asking for parsing and displaying a pdf file from a j2me application.

Note2: As far as i know, there is not... But i guess blackberry devices can open pdf files when they are attached in a mail.

Edit:

If it is possible:

What i need is to open a pdf file which is hosted in web server, from a mobile device. I don't want to write a pdf browser. I want my midlet (Java ME), let the mobile device to open the pdf with it's default pdf viewer.

This is similar to write a C# application:

Process process = new Process();
process.StartInfo.FileName = "explorer.exe";
process.StartInfo.Arguments = "http://domain-name.com/files/test.pdf";
process.Start();
A: 

No you can't open pdf's from with in j2me. Sorry.

drubin
+2  A: 

Well, first things first.

What happens on your mobile phone what you open the "http://domain-name/files/test.pdf" url?

Presumably, either your web browser downloads the file (and maybe asks if you want to open it afterwards) or your web browser and pdf reader are sufficiently integrated together that the pdf file is automatically displayed.

You can very probably mimic that behaviour from a J2ME application by using:
javax.microedition.midlet.MIDlet.platformRequest("http://domain-name/files/test.pdf");

If that's not good enough but your phone is clever enough (I don't know of any that clever yet), you may be able to use JSR-211 to discover a pdf-reading content handler.

QuickRecipesOnSymbianOS
Right, platformRequest seems to be the equivalent.
JCasso