tags:

views:

194

answers:

0

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