Hi everyone,
Is there a simple way to read/store the words from a pdf in order (for example, putting them in a NSMutableArray?) so each word can be retrieved later?
Thanks!
Hi everyone,
Is there a simple way to read/store the words from a pdf in order (for example, putting them in a NSMutableArray?) so each word can be retrieved later?
Thanks!
-Convert the PDF to an NSString
-Use componentsSeparatedByString to create an array of words
-Use sortedArrayUsingSelectorselector(caseInsensitiveCompare) to sort the array.
You'll have tons of duplicate words. You might want to remove those. To do that you could convert the array into an NSOrderedSet or NSMutableOrderedSet and sort that.