Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to open pdf

Hi Dudi,

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

dudi peretz
Posts: 0
Joined: Wed Jun 26, 2013 8:15 am

How to open pdf

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);
    }
    );

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to open pdf

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.

dudi peretz
Posts: 0
Joined: Wed Jun 26, 2013 8:15 am

How to open pdf

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?

dudi peretz
Posts: 0
Joined: Wed Jun 26, 2013 8:15 am

How to open pdf

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

Return to “Issues”