3

I am looking for word file processing in IOS application. I digging many things on google from that i found word file is based on OOXML. It`s possible for iOS to follow this format.Then please refer me if anyone have idea.


Then i tried to found another way to changes styles of .doc file. and i found, we can perform such thing in UIWebView using JavaScripts on .html file. But still not get how to store this .html file in .doc.


if anyone have idea regarding word-processor then guide me how it`s possible in objective C any help appreciated.

Thanks,

menjaraz
  • 7,551
  • 4
  • 41
  • 81
AJPatel
  • 2,291
  • 23
  • 42
  • refer http://stackoverflow.com/questions/6873583/iphone-app-that-formats-texts-like-a-word-processor – Maulik Jan 12 '12 at 12:46
  • but i have to perform all styling functionality like MS-Word. not only add text. if you work on it and have any good reference then tell me. – AJPatel Jan 12 '12 at 13:38

2 Answers2

6

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

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

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

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
0
- (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;
}
mahendra
  • 55
  • 1