How to create a .doc file or word processor in an iOS application?

I am looking for text file processing in an iOS application. I dig a lot of things in google from the fact that I found a word file based on OOXML . It is possible for iOS to follow this format. Then please email me if anyone has an idea.


Then I tried to find another way to change the styles of the .doc file. and I found we can accomplish such a thing in a UIWebView using JavaScripts in a .html file. But still, you won’t get how to store this .html file in .doc.


if anyone has an idea regarding a word processor then advise me how this is possible in objective C, any help is appreciated.

Thanks,

+3
source share
2 answers

Try the open source libopc library, which according to their website:

  • ISO / IEC 29500 standard,
  • cross platform
  • open source
  • standard C99-based

implementation of Part II (OPC) and Part III (MCE) of the ISO / IEC 29500 (OOXML) specification.

+6
source
- (NSString*)generate_Doc:(Projects *)project AndCompanyInformation:(CompanyInfo*)companyInfo; { NSDateFormatter *date_formater=[[NSDateFormatter alloc]init]; [date_formater setDateFormat:@"dd-MM-YYYY hh:mm"]; [date_formater setTimeZone:[DefaultDataManager AppTimeZone]]; NSDate *now = [DefaultDataManager AppCurrentTime]; NSString *fileName = [NSString stringWithFormat:@"%@ %@ %@.doc",project.title,project.reference,[date_formater stringFromDate:now]]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *docFileName = [documentsDirectory stringByAppendingPathComponent:fileName]; NSData *data = [docString dataFromRange:(NSRange){0, [docString length]} documentAttributes:@{NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType} error:NULL]; [data writeToFile:docFileName atomically:YES]; return docFileName; } 
0
source

All Articles