Question

I am creating a notepad android app that has different fonts to use. I am able to save the files as .txt but that extension does not save the font used so I was wondering if there is any way to save the file as .odt or .doc.

Thank you

Was it helpful?

Solution

Both the ODT and DOC format are relatively complex and are probably overkill for what you need.

However, if you wish to pursue that path, the most robust solution is to use a library like Aspose.Words.

What if you store your file as HTML? That would give you fonts and formatting with much less complexity.

OTHER TIPS

ODT file is totally different from txt file, its acutally a zip file containing multiple files(u can check this by renaming any odt file to zip file and extract its content) And for saving ODT file in java you can create object of OdfTextDocument in java using ODF tool kit library

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top