Wednesday 15 August 2012

android - How to save text from TextView in word file? -


I am preparing a speech-to-text Android application, where I display the text converted in textview. I want to save the converted text as a word file / pdf on the user's device. Can anyone tell me how to do this? Thank you.

To create a .pdf file

  // create a new document PdfDocument document = new PdfDocument (); // Single page description page page page page info pageInfo = new pageinfo.builder (new rack (0, 0, 100, 100), 1) .create (); // one page page page = start the document. Start page (pageInfo); // See some content on the page View = getContentView (); Content.draw (page.getCanvas ()); // End the page's document. Finnish Page (Page); . . . // Add more pages. . // Write the document content document. Type (getOutputStream ()); // Close the document document. Close ();  

For more detail, please take a look at the link below: I hope this will work.


No comments:

Post a Comment