search text in pdf in iphone

Posted by Jaimin on Stack Overflow See other posts from Stack Overflow or by Jaimin
Published on 2010-06-09T08:49:47Z Indexed on 2010/06/09 8:52 UTC
Read the original article Hit count: 203

Filed under:
|

i m trying to do search funtionality in iphone.. i pass the page number and the string to be searched.. but it is not getting the proper output. in contentStream i get nothing.. i got this code by googling. i dont know what will be dere in contentStream object.

-(BOOL)page:(CGPDFPageRef)inPage containsString:(NSString *)inSearchString;

{ [self setCurrentData:[NSMutableString string]]; CGPDFContentStreamRef contentStream = CGPDFContentStreamCreateWithPage(inPage); CGPDFScannerRef scanner = CGPDFScannerCreate(contentStream, table, self); bool ret = CGPDFScannerScan(scanner); CGPDFScannerRelease(scanner); CGPDFContentStreamRelease(contentStream); return ([[currentData uppercaseString] rangeOfString:[inSearchString uppercaseString]].location != NSNotFound); } need help urgently.. and if there is any other solution than also it is fine..

© Stack Overflow or respective owner

Related posts about iphone

Related posts about pdf