Page 1 of 3

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

Posted: Tue Feb 18, 2014 9:25 am
by Jordi Niubo

Hi

I have some data in my App and I would like to save this data in any format file.

I Would like to open this file like pdf in the same device or save in other format for send and print it.

It's possible this or something like?

Thanks you


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

Posted: Tue Feb 18, 2014 10:33 am
by Kateryna Grynko

Hi Jordi,

You can use this: https://github.com/eligrey/FileSaver.js


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

Posted: Wed Feb 19, 2014 8:40 am
by Jordi Niubo

Thank you Katya

This is awesome, I can save .csv too !


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

Posted: Wed Feb 19, 2014 5:31 pm
by Jordi Niubo

Hi again

I have problems with this. This work nice in web browser but don't save nothing in Device.

There are any other option for save files in device or any solution for the first code?

Thanks


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

Posted: Thu Feb 20, 2014 8:43 am
by Kateryna Grynko

Hi Jordi,

Take a look at here please:
https://getsatisfaction.com/apperyio/...


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

Posted: Thu Feb 20, 2014 9:34 am
by Jordi Niubo

Hi Katya,

This example is for downlad pdf file. I need to create new csv, txt, something like this.

Now with the first link I can create csv/txt file but only work in web browser.
I tested in device but don't download nothing, possible is for the route, I don't undersand all these code

I need to create csv or txt in Device and saving the local data of App in it. There are any example or something like?

Thanks for your time


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

Posted: Thu Feb 20, 2014 10:00 am
by Kateryna Grynko

Jordi,

What is your device and OS version?
https://getsatisfaction.com/apperyio/...


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

Posted: Thu Feb 20, 2014 10:19 am
by Jordi Niubo

Tablet Google Nexus 10 Android 4.4.2
Motorola G Android 4.4.2

I will try this example


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

Posted: Thu Feb 20, 2014 10:40 am
by Kateryna Grynko

Jordi,

Let us know about the result please.


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

Posted: Thu Feb 20, 2014 10:59 am
by Jordi Niubo

I tryed the examples of LocalFileSystem and I have problems in device and web browser have problems:

With:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,nFileSystemSuccess, fail);
Error: Uncaught ReferenceError: LocalFileSystem is not defined
With:
window.resolveLocalFileSystemURI("file:///example.txt", onResolveSuccess, fail);
Error: Uncaught TypeError: Object [object global] has no method 'resolveLocalFileSystemURI

I'm so bad with this, sorry