-1

I'm trying to get all data from .docx .pages files like this: (i need to extract phone number, picture and some more information)

    NSString* path = [[NSBundle mainBundle] pathForResource:@"FileName" ofType:@"pages"];
NSString *fileContents = [NSString stringWithContentsOfFile:path encoding:NSISOLatin1StringEncoding error:NULL];
for (NSString *line in [fileContents componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]) {
    NSLog(@"%@", line);
}

Can someone help me to solve this isue?

Darvas
  • 974
  • 3
  • 14
  • 27

1 Answers1

0

You can use apache poi (it is open source ) for extracting data from docx.

  • Thank you, i will try it soon. Maybe you can recommend any guide ? :) – Darvas Mar 13 '15 at 07:55
  • A docx has own ".xml" format . then u can retrive your information from that xml .You can follow this step 1)Read the docx file 2)Unzip it 3)Get The Contents of the 'word/document.xml' file – mahamudsust Mar 13 '15 at 10:21