0

Hi is it possible to open a file in an external program from within rhodes? Open / Viewing a pdf or epub?

Thanks a lot!

gletscher
  • 1,132
  • 2
  • 11
  • 18

2 Answers2

1
rhodes_path = File.join(Rho::RhoApplication::get_base_app_path(), 'local/path/to/file.pdf')
System.open_url(rhodes_path)
Alexey
  • 146
  • 1
  • 4
1

Yes it is.

Use System.open_url : you can provide any url with any schema(http, file etc), depending of platform will be run associated application to handle this url

System.open_url('http://www.rhomobile.com')

It is also explained here in the Rhodes Documentation and you can find a code sample of how to do it here.

corthmann
  • 377
  • 1
  • 2
  • 9