Page 2 of 3

Create PDF, note, .txt, or something for print information.

Posted: Thu Feb 20, 2014 5:08 pm
by Maryna Brodina

Hello! This code is from here http://cordova.apache.org/docs/en/3.0...prefunction gotFS(fileSystem) {
fileSystem.root.getFile("readme.txt", {
create: true,
exclusive: false
}, gotFileEntry, fail);
}

Code: Select all

                 function gotFileEntry(fileEntry) { 
                     fileEntry.createWriter(gotFileWriter, fail); 
                 } 

                 function gotFileWriter(writer) { 
                     writer.onwriteend = function(evt) { 
                         console.log("contents of file now 'some sample text'"); 
                         writer.truncate(11); 
                         writer.onwriteend = function(evt) { 
                             console.log("contents of file now 'some sample'"); 
                             writer.seek(4); 
                             writer.write(" different text"); 
                             writer.onwriteend = function(evt) { 
                                 console.log("contents of file now 'some different text'"); 
                             } 
                         }; 
                     }; 
                     writer.write("some sample text"); 
                 } 

                 function fail(error) { 
                     console.log(error.code); 
                 } 

                     window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);/preIt works if you install app on device (we tested it). It shouldn't work in browser because it's PhoneGap feature.

Create PDF, note, .txt, or something for print information.

Posted: Thu Feb 20, 2014 7:25 pm
by Jordi Niubo

wow, awesome Maryna

This work so nice ^^

I will play with the code and make csv or something like :)

Thanks a lot for your time Maryna and Katya


Create PDF, note, .txt, or something for print information.

Posted: Thu Sep 11, 2014 10:20 am
by Amith Reddy

how to upload image in appery and store it into database


Create PDF, note, .txt, or something for print information.

Posted: Thu Sep 11, 2014 10:24 am
by Evgene Karachevtsev

Hello Amith,

This link should help you: http://devcenter.appery.io/tutorials/...


Create PDF, note, .txt, or something for print information.

Posted: Fri Nov 14, 2014 4:46 am
by Ellen Schlechter

So like is there any way that a user can generate an excel file based on what they have stored in the database? They wouldn't necessarily have to see it but as long as it can be automatically emailed to them, that would be pretty cool.


Create PDF, note, .txt, or something for print information.

Posted: Fri Nov 14, 2014 8:36 pm
by Evgene Karachevtsev

Hello Ellen,

This is possible. Please create the file and send it using for example Sendgrid
https://sendgrid.com/docs/API_Referen...


Create PDF, note, .txt, or something for print information.

Posted: Tue Nov 18, 2014 3:26 pm
by Ellen Schlechter

That page has an error. Also, how can I get it so that from the database, it creates an excel file with only certain entries?


Create PDF, note, .txt, or something for print information.

Posted: Tue Nov 18, 2014 8:36 pm
by Maryna Brodina

Hello!

You would need to select specific object from service response before you create file.


Create PDF, note, .txt, or something for print information.

Posted: Tue Nov 18, 2014 11:29 pm
by Ellen Schlechter

How would I even create a file?


Create PDF, note, .txt, or something for print information.

Posted: Wed Nov 19, 2014 12:41 am
by Illya Stepanov

Hi Ellen,

This could be done with Cordova File API as Maryna said above. - http://goo.gl/fvY4wc