1

I've tried to open local PDFs stored in the Resources/Documents folder in my XCode project. The code I put in .js file is:

Cordova.exec("ChildBrowserCommand.showWebPage", "file://"+pdf );

Where pdf is the name of the file, which changes for every file. But ChildBrowser doesn't open it. How can I fix this?

Thanks!

dda
  • 6,030
  • 2
  • 25
  • 34
Riccardo Cestari
  • 113
  • 1
  • 12

1 Answers1

0

I could solve by myself. The path needed to have three slashes so I wrote Cordova.exec("ChildBrowserCommand.showWebPage", "file:///www/Documents/"+pdf ); I think it works if the documents directory is under www folder.

Riccardo Cestari
  • 113
  • 1
  • 12