Page 2 of 2

How to open pdf

Posted: Fri Jul 12, 2013 10:36 am
by Kateryna Grynko

Hi Dudi,

Find here please:
http://docs.phonegap.com/en/2.4.0/cor...


How to open pdf

Posted: Fri Jul 12, 2013 1:02 pm
by dudi peretz

Hi Katya,

I did the following code, but I got error "FileTransfer" not define.

  1. Any idea why I get this error, as far I know phonegap already included?

  2. how can I show the user the downloaded file from the code below it's only download it to device?

    var fileTransfer = new FileTransfer();
    var uri = encodeURI("http://some.server.com/download.php");

    fileTransfer.download(
    uri,
    filePath,
    function(entry) {
    console.log("download complete: " + entry.fullPath);
    },
    function(error) {
    console.log("download error source " + error.source);
    console.log("download error target " + error.target);
    console.log("upload error code" + error.code);
    }
    );


How to open pdf

Posted: Fri Jul 12, 2013 1:33 pm
by Kateryna Grynko

When do you run the code? On what event?

Did you test this on browser or on device installed?
This should be tested on device.


How to open pdf

Posted: Fri Jul 12, 2013 1:42 pm
by dudi peretz

Hi Katya,

I manged it using the following code:
https://gist.github.com/nathanpc/2464060

So now the file stored on the file system and now I want to load & open it to the user.
Any idea how to do it?


How to open pdf

Posted: Sun Jul 14, 2013 10:04 am
by Igor

How to open pdf

Posted: Tue Jul 16, 2013 7:31 am
by dudi peretz

Thanks.
I managed it and post it to the forum.
https://getsatisfaction.com/apperyio/...