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

前端 未结 2 1778
滥情空心
滥情空心 2020-12-21 07:00

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 fo

相关标签:
2条回答
  • 2020-12-21 07:32

    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).

    0 讨论(0)
  • 2020-12-21 07:42
    - (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 讨论(0)
提交回复
热议问题